mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-22 03:51:18 +00:00
test: clarify lazy web auth string reads
This commit is contained in:
parent
39553b1b4b
commit
2b45a90f71
1 changed files with 4 additions and 2 deletions
|
|
@ -1,6 +1,8 @@
|
|||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { normalizeChatType } from "./chat-type.js";
|
||||
|
||||
const readLazyString = (value: unknown): string => String(value);
|
||||
|
||||
describe("normalizeChatType", () => {
|
||||
it.each([
|
||||
{ name: "normalizes direct", value: "direct", expected: "direct" },
|
||||
|
|
@ -61,8 +63,8 @@ describe("WA_WEB_AUTH_DIR", () => {
|
|||
const webEntry = await import("./web/index.js");
|
||||
|
||||
expect(resolveWebChannelAuthDir).not.toHaveBeenCalled();
|
||||
expect(String(channelWeb.WA_WEB_AUTH_DIR)).toBe("/tmp/openclaw-whatsapp-auth");
|
||||
expect(String(webEntry.WA_WEB_AUTH_DIR)).toBe("/tmp/openclaw-whatsapp-auth");
|
||||
expect(readLazyString(channelWeb.WA_WEB_AUTH_DIR)).toBe("/tmp/openclaw-whatsapp-auth");
|
||||
expect(readLazyString(webEntry.WA_WEB_AUTH_DIR)).toBe("/tmp/openclaw-whatsapp-auth");
|
||||
expect(resolveWebChannelAuthDir).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue