From 642e6acf49518de02664f1d0e46537c16f478b02 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 12 Jan 2026 07:17:21 +0000 Subject: [PATCH] test: unmock config for lan onboarding auto-token (#766) --- .../onboard-non-interactive.lan-auto-token.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/commands/onboard-non-interactive.lan-auto-token.test.ts b/src/commands/onboard-non-interactive.lan-auto-token.test.ts index 18b30b9d9..db34440ba 100644 --- a/src/commands/onboard-non-interactive.lan-auto-token.test.ts +++ b/src/commands/onboard-non-interactive.lan-auto-token.test.ts @@ -3,7 +3,7 @@ import { createServer } from "node:net"; import os from "node:os"; import path from "node:path"; -import { describe, expect, it } from "vitest"; +import { describe, expect, it, vi } from "vitest"; import { WebSocket } from "ws"; import { PROTOCOL_VERSION } from "../gateway/protocol/index.js"; @@ -144,6 +144,11 @@ describe("onboard (non-interactive): lan bind auto-token", () => { }, }; + // Other test files mock ../config/config.js. This onboarding flow needs the real + // implementation so it can persist the config and then read it back. + vi.unmock("../config/config.js"); + vi.resetModules(); + const { runNonInteractiveOnboarding } = await import( "./onboard-non-interactive.js" );