Skip to content

Commit 44cad6f

Browse files
committed
refactor: simplify wake APNs test mock
1 parent 275caeb commit 44cad6f

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

src/gateway/server-methods/nodes.wake-leak.test.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,7 @@ const mocks = vi.hoisted(() => ({
2929
shouldClearStoredApnsRegistration: vi.fn(() => false),
3030
}));
3131

32-
vi.mock("../../infra/push-apns.js", () => ({
33-
clearApnsRegistrationIfCurrent: mocks.clearApnsRegistrationIfCurrent,
34-
loadApnsRegistration: mocks.loadApnsRegistration,
35-
resolveApnsAuthConfigFromEnv: mocks.resolveApnsAuthConfigFromEnv,
36-
resolveApnsRelayConfigFromEnv: mocks.resolveApnsRelayConfigFromEnv,
37-
sendApnsBackgroundWake: mocks.sendApnsBackgroundWake,
38-
sendApnsAlert: mocks.sendApnsAlert,
39-
shouldClearStoredApnsRegistration: mocks.shouldClearStoredApnsRegistration,
40-
}));
32+
vi.mock("../../infra/push-apns.js", () => mocks);
4133

4234
import { testing as wakeTesting } from "./nodes-wake-state.js";
4335
import { maybeWakeNodeWithApns } from "./nodes.js";

0 commit comments

Comments
 (0)