From fbb9bb08c5e350b22b0aed7ab4a7dc00e4b14bc0 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 7 Mar 2026 18:33:25 +0000 Subject: [PATCH] style(test): format gateway auth token coverage --- .../doctor-gateway-auth-token.test.ts | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) 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", () => {