mirror of https://github.com/openclaw/openclaw.git
Fix windows ACL os mock typing
This commit is contained in:
parent
3261a2a0b1
commit
53a34c39f6
|
|
@ -5,10 +5,11 @@ const MOCK_USERNAME = "MockUser";
|
|||
|
||||
vi.mock("node:os", async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import("node:os")>();
|
||||
const base = ("default" in actual ? actual.default : actual) as Record<string, unknown>;
|
||||
return {
|
||||
...actual,
|
||||
default: {
|
||||
...actual.default,
|
||||
...base,
|
||||
userInfo: () => ({ username: MOCK_USERNAME }),
|
||||
},
|
||||
userInfo: () => ({ username: MOCK_USERNAME }),
|
||||
|
|
|
|||
Loading…
Reference in New Issue