mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 01:10:21 +00:00
test: speed up core runtime suites
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { MsgContext } from "../auto-reply/templating.js";
|
||||
|
||||
const recordSessionMetaFromInboundMock = vi.fn((_args?: unknown) => Promise.resolve(undefined));
|
||||
@@ -21,9 +21,11 @@ describe("recordInboundSession", () => {
|
||||
OriginatingTo: "demo-channel:1234",
|
||||
};
|
||||
|
||||
beforeEach(async () => {
|
||||
vi.resetModules();
|
||||
beforeAll(async () => {
|
||||
({ recordInboundSession } = await import("./session.js"));
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
recordSessionMetaFromInboundMock.mockClear();
|
||||
updateLastRouteMock.mockClear();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user