diff --git a/src/commands/doctor-gateway-auth-token.test.ts b/src/commands/doctor-gateway-auth-token.test.ts index 5ff570814fe..f09ce2f6e98 100644 --- a/src/commands/doctor-gateway-auth-token.test.ts +++ b/src/commands/doctor-gateway-auth-token.test.ts @@ -181,18 +181,21 @@ describe("shouldRequireGatewayTokenForInstall", () => { }); it("requires token in inferred mode when password env exists only in shell", async () => { - await withEnvAsync({ [envVar("OPENCLAW", "GATEWAY", "PASSWORD")]: "password-from-env" }, async () => { - // pragma: allowlist secret - const required = shouldRequireGatewayTokenForInstall( - { - gateway: { - auth: {}, - }, - } as OpenClawConfig, - process.env, - ); - expect(required).toBe(true); - }); + await withEnvAsync( + { [envVar("OPENCLAW", "GATEWAY", "PASSWORD")]: "password-from-env" }, + async () => { + // pragma: allowlist secret + const required = shouldRequireGatewayTokenForInstall( + { + gateway: { + auth: {}, + }, + } as OpenClawConfig, + process.env, + ); + expect(required).toBe(true); + }, + ); }); it("does not require token in inferred mode when password is configured", () => {