Skip to content

Commit bac2df4

Browse files
committed
test: isolate child adapter service env
1 parent bbb3a16 commit bac2df4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/process/supervisor/adapters/child.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { ChildProcess } from "node:child_process";
22
import { EventEmitter } from "node:events";
33
import { PassThrough } from "node:stream";
4-
import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
4+
import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
55

66
const { spawnWithFallbackMock, killProcessTreeMock } = vi.hoisted(() => ({
77
spawnWithFallbackMock: vi.fn(),
@@ -58,6 +58,10 @@ describe("createChildAdapter", () => {
5858
beforeEach(() => {
5959
spawnWithFallbackMock.mockClear();
6060
killProcessTreeMock.mockClear();
61+
delete process.env.OPENCLAW_SERVICE_MARKER;
62+
});
63+
64+
afterAll(() => {
6165
if (originalServiceMarker === undefined) {
6266
delete process.env.OPENCLAW_SERVICE_MARKER;
6367
} else {

0 commit comments

Comments
 (0)