aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUri Shaked2023-01-05 20:46:24 +0200
committerUri Shaked2023-01-05 20:46:24 +0200
commit394633425253d4b680c93814f111359807f2c329 (patch)
treef5c83e44d50c0b97ac556d3429b4ff14177c9c25 /src
parentchore: update copyright years (diff)
downloadavr8js-394633425253d4b680c93814f111359807f2c329.tar.gz
avr8js-394633425253d4b680c93814f111359807f2c329.tar.bz2
avr8js-394633425253d4b680c93814f111359807f2c329.zip
chore(deps): upgrade typescript, jest, eslint
also upgrade related dependencies: ts-node, ts-jest
Diffstat (limited to 'src')
-rw-r--r--src/cpu/cpu.spec.ts6
-rw-r--r--src/peripherals/gpio.spec.ts2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/cpu/cpu.spec.ts b/src/cpu/cpu.spec.ts
index 969b51c..e62dcc8 100644
--- a/src/cpu/cpu.spec.ts
+++ b/src/cpu/cpu.spec.ts
@@ -1,4 +1,4 @@
-import { CPU } from './cpu';
+import { AVRClockEventCallback, CPU } from './cpu';
type ITestEvent = [number, number]; // Expected cycles, actual cycles
@@ -47,7 +47,7 @@ describe('cpu', () => {
it('should update the number of cycles for the given clock event', () => {
const cpu = new CPU(new Uint16Array(1024), 0x1000);
const events: ITestEvent[] = [];
- const callbacks = [];
+ const callbacks: AVRClockEventCallback[] = [];
for (const i of [1, 4, 10]) {
callbacks[i] = cpu.addClockEvent(() => events.push([i, cpu.cycles]), i);
}
@@ -68,7 +68,7 @@ describe('cpu', () => {
it('should remove the given clock event', () => {
const cpu = new CPU(new Uint16Array(1024), 0x1000);
const events: ITestEvent[] = [];
- const callbacks = [];
+ const callbacks: AVRClockEventCallback[] = [];
for (const i of [1, 4, 10]) {
callbacks[i] = cpu.addClockEvent(() => events.push([i, cpu.cycles]), i);
}
diff --git a/src/peripherals/gpio.spec.ts b/src/peripherals/gpio.spec.ts
index 67cd779..755476e 100644
--- a/src/peripherals/gpio.spec.ts
+++ b/src/peripherals/gpio.spec.ts
@@ -137,7 +137,7 @@ describe('GPIO', () => {
cpu.writeData(DDRB, 0x0f);
port.removeListener(listener);
cpu.writeData(PORTB, 0x99);
- expect(listener).toBeCalledTimes(1);
+ expect(listener).toHaveBeenCalledTimes(1);
});
});