diff options
| author | Uri Shaked | 2025-02-11 10:22:50 +0200 |
|---|---|---|
| committer | Uri Shaked | 2025-02-11 10:22:50 +0200 |
| commit | 05c5c7e9069e1ace3441c1f8f12e45b3d304748e (patch) | |
| tree | 8047a1a96c544794300bd80ecfc4590315be7076 /src/peripherals/adc.spec.ts | |
| parent | ci: update Node.js versions (diff) | |
| download | avr8js-05c5c7e9069e1ace3441c1f8f12e45b3d304748e.tar.gz avr8js-05c5c7e9069e1ace3441c1f8f12e45b3d304748e.tar.bz2 avr8js-05c5c7e9069e1ace3441c1f8f12e45b3d304748e.zip | |
test: migrate tests from jest to vitest
Diffstat (limited to '')
| -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 |
