mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-11 09:11:13 +00:00
test: speed up core runtime suites
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import type { SecretInput } from "../config/types.secrets.js";
|
||||
|
||||
vi.mock("../infra/device-bootstrap.js", () => ({
|
||||
@@ -158,16 +158,18 @@ describe("pairing setup code", () => {
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
vi.resetModules();
|
||||
vi.stubEnv("OPENCLAW_GATEWAY_TOKEN", "");
|
||||
vi.stubEnv("OPENCLAW_GATEWAY_PASSWORD", "");
|
||||
vi.stubEnv("OPENCLAW_GATEWAY_PORT", "");
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
beforeAll(async () => {
|
||||
({ encodePairingSetupCode, resolvePairingSetupFromConfig } = await import("./setup-code.js"));
|
||||
({ issueDeviceBootstrapToken: issueDeviceBootstrapTokenMock } =
|
||||
await import("../infra/device-bootstrap.js"));
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
vi.mocked(issueDeviceBootstrapTokenMock).mockClear();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user