mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-31 20:01:36 +00:00
test: continue vitest threads migration
This commit is contained in:
@@ -12,12 +12,18 @@ let callGatewayTool: typeof import("./tools/gateway.js").callGatewayTool;
|
||||
let requestExecApprovalDecision: typeof import("./bash-tools.exec-approval-request.js").requestExecApprovalDecision;
|
||||
|
||||
describe("requestExecApprovalDecision", () => {
|
||||
beforeAll(async () => {
|
||||
async function loadFreshApprovalRequestModulesForTest() {
|
||||
vi.resetModules();
|
||||
({ callGatewayTool } = await import("./tools/gateway.js"));
|
||||
({ requestExecApprovalDecision } = await import("./bash-tools.exec-approval-request.js"));
|
||||
}
|
||||
|
||||
beforeAll(async () => {
|
||||
await loadFreshApprovalRequestModulesForTest();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
beforeEach(async () => {
|
||||
await loadFreshApprovalRequestModulesForTest();
|
||||
vi.mocked(callGatewayTool).mockClear();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user