test(esp32): add hardResetPinStates to PinManager mocks in 6 test files
Same root cause as the previous test fix in3e38397— upstream commitd64eebc(fix(stop): reset CPU to PC=0) added a hardResetPinStates() call to useSimulatorStore.stopBoard. The vi.mock factories in these 6 ESP32- adjacent test files only exposed updatePort/onPinChange/getListenersCount, so any test path that hits stopBoard crashed with "is not a function" once the real prod code called the new method. Each gets a single-line addition: this.hardResetPinStates = vi.fn(); Verified with full vitest run: 127 files pass, 2,005 tests pass, 0 failures. 🤖 Generated with Claude Code Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
3e38397366
commit
0d37472aa3
|
|
@ -58,6 +58,7 @@ vi.mock('../simulation/PinManager', () => ({
|
|||
this.onPinChange = vi.fn().mockReturnValue(() => {});
|
||||
this.onPwmChange = vi.fn().mockReturnValue(() => {});
|
||||
this.getListenersCount = vi.fn().mockReturnValue(0);
|
||||
this.hardResetPinStates = vi.fn();
|
||||
this.updatePwm = vi.fn();
|
||||
}),
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ vi.mock('../simulation/PinManager', () => ({
|
|||
this.updatePort = vi.fn();
|
||||
this.onPinChange = vi.fn().mockReturnValue(() => {});
|
||||
this.getListenersCount = vi.fn().mockReturnValue(0);
|
||||
this.hardResetPinStates = vi.fn();
|
||||
this.resetPinStates = vi.fn();
|
||||
}),
|
||||
}));
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ vi.mock('../simulation/PinManager', () => ({
|
|||
this.onPinChange = vi.fn().mockReturnValue(() => {});
|
||||
this.onPwmChange = vi.fn().mockReturnValue(() => {});
|
||||
this.getListenersCount = vi.fn().mockReturnValue(0);
|
||||
this.hardResetPinStates = vi.fn();
|
||||
this.updatePwm = vi.fn();
|
||||
this.triggerPinChange = vi.fn();
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ vi.mock('../simulation/PinManager', () => ({
|
|||
this.updatePort = vi.fn();
|
||||
this.onPinChange = vi.fn().mockReturnValue(() => {});
|
||||
this.getListenersCount = vi.fn().mockReturnValue(0);
|
||||
this.hardResetPinStates = vi.fn();
|
||||
}),
|
||||
}));
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ vi.mock('../simulation/PinManager', () => ({
|
|||
this.updatePort = vi.fn();
|
||||
this.onPinChange = vi.fn().mockReturnValue(() => {});
|
||||
this.getListenersCount = vi.fn().mockReturnValue(0);
|
||||
this.hardResetPinStates = vi.fn();
|
||||
}),
|
||||
}));
|
||||
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ vi.mock('../simulation/PinManager', () => ({
|
|||
this.updatePort = vi.fn();
|
||||
this.onPinChange = vi.fn().mockReturnValue(() => {});
|
||||
this.getListenersCount = vi.fn().mockReturnValue(0);
|
||||
this.hardResetPinStates = vi.fn();
|
||||
}),
|
||||
}));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue