test(whatsapp): accept native Windows auth paths · openclaw/openclaw@3d3b0da
vincentkoc
·
2026-05-05
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { rmSync } from "node:fs"; |
2 | 2 | import fs from "node:fs/promises"; |
| 3 | +import path from "node:path"; |
3 | 4 | import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; |
4 | 5 | import { afterAll, afterEach, beforeEach, describe, expect, it, vi } from "vitest"; |
5 | 6 | import { loginWeb } from "./login.js"; |
@@ -158,7 +159,7 @@ describe("loginWeb coverage", () => {
|
158 | 159 | /cache cleared/i, |
159 | 160 | ); |
160 | 161 | expect(runtime.error).toHaveBeenCalledWith(expect.stringContaining("session is logged out")); |
161 | | -expect(rmMock).toHaveBeenCalledWith(testState.authDir, { |
| 162 | +expect(rmMock).toHaveBeenCalledWith(path.resolve(testState.authDir), { |
162 | 163 | recursive: true, |
163 | 164 | force: true, |
164 | 165 | }); |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -31,8 +31,8 @@ async function emitCredsUpdate(authDir?: string) {
|
31 | 31 | } |
32 | 32 | |
33 | 33 | function createTempAuthDir(prefix: string) { |
34 | | -return fsSync.mkdtempSync( |
35 | | -path.join((process.env.TMPDIR ?? "/tmp").replace(/\/+$/, ""), `${prefix}-`), |
| 34 | +return path.resolve( |
| 35 | +fsSync.mkdtempSync(path.join((process.env.TMPDIR ?? "/tmp").replace(/\/+$/, ""), `${prefix}-`)), |
36 | 36 | ); |
37 | 37 | } |
38 | 38 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。