mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:40:44 +00:00
test(whatsapp): accept native Windows auth paths
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { rmSync } from "node:fs";
|
||||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
|
||||
import { afterAll, afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { loginWeb } from "./login.js";
|
||||
@@ -158,7 +159,7 @@ describe("loginWeb coverage", () => {
|
||||
/cache cleared/i,
|
||||
);
|
||||
expect(runtime.error).toHaveBeenCalledWith(expect.stringContaining("session is logged out"));
|
||||
expect(rmMock).toHaveBeenCalledWith(testState.authDir, {
|
||||
expect(rmMock).toHaveBeenCalledWith(path.resolve(testState.authDir), {
|
||||
recursive: true,
|
||||
force: true,
|
||||
});
|
||||
|
||||
@@ -31,8 +31,8 @@ async function emitCredsUpdate(authDir?: string) {
|
||||
}
|
||||
|
||||
function createTempAuthDir(prefix: string) {
|
||||
return fsSync.mkdtempSync(
|
||||
path.join((process.env.TMPDIR ?? "/tmp").replace(/\/+$/, ""), `${prefix}-`),
|
||||
return path.resolve(
|
||||
fsSync.mkdtempSync(path.join((process.env.TMPDIR ?? "/tmp").replace(/\/+$/, ""), `${prefix}-`)),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user