test: unmock config for lan onboarding auto-token (#766)
This commit is contained in:
@@ -3,7 +3,7 @@ import { createServer } from "node:net";
|
|||||||
import os from "node:os";
|
import os from "node:os";
|
||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
|
|
||||||
import { describe, expect, it } from "vitest";
|
import { describe, expect, it, vi } from "vitest";
|
||||||
import { WebSocket } from "ws";
|
import { WebSocket } from "ws";
|
||||||
|
|
||||||
import { PROTOCOL_VERSION } from "../gateway/protocol/index.js";
|
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(
|
const { runNonInteractiveOnboarding } = await import(
|
||||||
"./onboard-non-interactive.js"
|
"./onboard-non-interactive.js"
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user