diff options
Diffstat (limited to 'src/peripherals/adc.spec.ts')
| -rw-r--r-- | src/peripherals/adc.spec.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/peripherals/adc.spec.ts b/src/peripherals/adc.spec.ts index 4eb9aff..c67b615 100644 --- a/src/peripherals/adc.spec.ts +++ b/src/peripherals/adc.spec.ts @@ -1,6 +1,7 @@ +import { describe, expect, it, vi } from 'vitest'; import { CPU } from '../cpu/cpu'; import { asmProgram, TestProgramRunner } from '../utils/test-utils'; -import { AVRADC, adcConfig, ADCMuxInputType } from './adc'; +import { adcConfig, ADCMuxInputType, AVRADC } from './adc'; const R16 = 16; const R17 = 17; @@ -51,7 +52,7 @@ describe('ADC', () => { const adc = new AVRADC(cpu, adcConfig); const runner = new TestProgramRunner(cpu); - const adcReadSpy = jest.spyOn(adc, 'onADCRead'); + const adcReadSpy = vi.spyOn(adc, 'onADCRead'); adc.channelValues[0] = 2.56; // should result in 2.56/5*1024 = 524 // Setup @@ -114,7 +115,7 @@ describe('ADC', () => { /* do nothing on break */ }); - const adcReadSpy = jest.spyOn(adc, 'onADCRead'); + const adcReadSpy = vi.spyOn(adc, 'onADCRead'); adc.channelValues[0] = 2.56; // should result in 2.56/5*1024 = 524 // Setup |
