test: force real config module for lan onboarding test (#766)
This commit is contained in:
@@ -145,9 +145,14 @@ describe("onboard (non-interactive): lan bind auto-token", () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Other test files mock ../config/config.js. This onboarding flow needs the real
|
// 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.
|
// implementation so it can persist the config and then read it back (Windows CI
|
||||||
vi.unmock("../config/config.js");
|
// otherwise sees a mocked writeConfigFile and the config never lands on disk).
|
||||||
vi.resetModules();
|
vi.resetModules();
|
||||||
|
vi.doMock("../config/config.js", async () => {
|
||||||
|
return (await vi.importActual(
|
||||||
|
"../config/config.js",
|
||||||
|
)) as typeof import("../config/config.js");
|
||||||
|
});
|
||||||
|
|
||||||
const { runNonInteractiveOnboarding } = await import(
|
const { runNonInteractiveOnboarding } = await import(
|
||||||
"./onboard-non-interactive.js"
|
"./onboard-non-interactive.js"
|
||||||
|
|||||||
Reference in New Issue
Block a user