mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 15:40:44 +00:00
test: narrow auth usage store mock
This commit is contained in:
@@ -18,14 +18,10 @@ const storeMocks = vi.hoisted(() => ({
|
||||
}));
|
||||
const fetchMock = vi.hoisted(() => vi.fn());
|
||||
|
||||
vi.mock("./store.js", async () => {
|
||||
const original = await vi.importActual<typeof import("./store.js")>("./store.js");
|
||||
return {
|
||||
...original,
|
||||
updateAuthProfileStoreWithLock: storeMocks.updateAuthProfileStoreWithLock,
|
||||
saveAuthProfileStore: storeMocks.saveAuthProfileStore,
|
||||
};
|
||||
});
|
||||
vi.mock("./store.js", () => ({
|
||||
updateAuthProfileStoreWithLock: storeMocks.updateAuthProfileStoreWithLock,
|
||||
saveAuthProfileStore: storeMocks.saveAuthProfileStore,
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks();
|
||||
|
||||
Reference in New Issue
Block a user