mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 03:30:30 +00:00
test: isolate base vitest thread blockers
This commit is contained in:
@@ -103,6 +103,8 @@ type RunWithModelFallbackParams = {
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
vi.useRealTimers();
|
||||
vi.clearAllTimers();
|
||||
runEmbeddedPiAgentMock.mockClear();
|
||||
runCliAgentMock.mockClear();
|
||||
runWithModelFallbackMock.mockClear();
|
||||
@@ -151,6 +153,7 @@ beforeEach(() => {
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
vi.clearAllTimers();
|
||||
vi.useRealTimers();
|
||||
resetSystemEventsForTest();
|
||||
});
|
||||
|
||||
@@ -142,6 +142,8 @@ afterAll(async () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
vi.useRealTimers();
|
||||
vi.clearAllTimers();
|
||||
setDefaultChannelPluginRegistryForTests();
|
||||
readConfigFileSnapshotMock.mockImplementation(async () => {
|
||||
const configPath = process.env.OPENCLAW_CONFIG_PATH;
|
||||
|
||||
Reference in New Issue
Block a user