mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 22:51:23 +00:00
test(core): trim redundant test resets and use mockClear
This commit is contained in:
@@ -17,7 +17,7 @@ describe("noteSessionLockHealth", () => {
|
||||
let envSnapshot: ReturnType<typeof captureEnv>;
|
||||
|
||||
beforeEach(async () => {
|
||||
note.mockReset();
|
||||
note.mockClear();
|
||||
envSnapshot = captureEnv(["OPENCLAW_STATE_DIR"]);
|
||||
root = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-doctor-locks-"));
|
||||
process.env.OPENCLAW_STATE_DIR = root;
|
||||
|
||||
@@ -77,7 +77,7 @@ describe("doctor state integrity oauth dir checks", () => {
|
||||
process.env.OPENCLAW_STATE_DIR = path.join(tempHome, ".openclaw");
|
||||
delete process.env.OPENCLAW_OAUTH_DIR;
|
||||
fs.mkdirSync(process.env.OPENCLAW_STATE_DIR, { recursive: true, mode: 0o700 });
|
||||
vi.mocked(note).mockReset();
|
||||
vi.mocked(note).mockClear();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user