test(tooling): isolate a2ui copy env

This commit is contained in:
Vincent Koc
2026-05-03 01:07:58 -07:00
parent d89be34360
commit d583662fd9

View File

@@ -1,6 +1,6 @@
import fs from "node:fs/promises";
import path from "node:path";
import { afterEach, describe, expect, it } from "vitest";
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import { copyA2uiAssets } from "../../scripts/canvas-a2ui-copy.js";
import { withTempDir } from "../test-utils/temp-dir.js";
@@ -8,6 +8,11 @@ const ORIGINAL_SKIP_MISSING = process.env.OPENCLAW_A2UI_SKIP_MISSING;
const ORIGINAL_SPARSE_PROFILE = process.env.OPENCLAW_SPARSE_PROFILE;
describe("canvas a2ui copy", () => {
beforeEach(() => {
delete process.env.OPENCLAW_A2UI_SKIP_MISSING;
delete process.env.OPENCLAW_SPARSE_PROFILE;
});
afterEach(() => {
if (ORIGINAL_SKIP_MISSING === undefined) {
delete process.env.OPENCLAW_A2UI_SKIP_MISSING;