fix: remove contradictory vi.unmock breaking recover DB fallback tests

The test file had both vi.unmock and vi.mock for the same module.
vi.unmock takes precedence in Vitest, so getAllKeys was the real
function instead of a mock, causing mockReturnValueOnce to fail.
This commit is contained in:
OpenClaw Subagent 2026-03-19 11:07:22 +01:00
parent 2e8a240654
commit b58695bdb8

View file

@ -1,7 +1,5 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
// Unmock keys to use real getAllKeys (but we'll mock it ourselves)
vi.unmock("../services/keys.js");
// verification.js and email.js are mocked below
vi.mock("../services/db.js", () => ({