test: dedupe core test teardown paths

This commit is contained in:
Peter Steinberger
2026-04-03 07:14:44 +01:00
parent b66197f932
commit 051b5ddafe
14 changed files with 8 additions and 49 deletions

View File

@@ -28,7 +28,6 @@ const {
listDevicePairing,
approveDevicePairing,
summarizeDeviceTokens,
withProgress,
} = mocks;
vi.mock("../gateway/call.js", () => ({
@@ -337,20 +336,12 @@ beforeEach(() => {
});
afterEach(() => {
buildGatewayConnectionDetails.mockClear();
buildGatewayConnectionDetails.mockReturnValue({
url: "ws://127.0.0.1:18789",
urlSource: "local loopback",
message: "",
});
listDevicePairing.mockClear();
listDevicePairing.mockResolvedValue({ pending: [], paired: [] });
approveDevicePairing.mockClear();
approveDevicePairing.mockResolvedValue(undefined);
summarizeDeviceTokens.mockClear();
summarizeDeviceTokens.mockReturnValue(undefined);
withProgress.mockClear();
runtime.log.mockClear();
runtime.error.mockClear();
runtime.exit.mockClear();
});