Skip to content

Commit 7adc04e

Browse files
patnikoCopilot
andcommitted
fix: fix glob snapshot mismatch and session cleanup in e2e tests
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4e20af1 commit 7adc04e

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

nodejs/test/e2e/session.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { rm } from "fs/promises";
12
import { describe, expect, it, onTestFinished } from "vitest";
23
import { ParsedHttpExchange } from "../../../test/harness/replayingCapiProxy.js";
34
import { CopilotClient, approveAll } from "../../src/index.js";
@@ -356,6 +357,9 @@ describe("Sessions", async () => {
356357

357358
it("should create session with custom config dir", async () => {
358359
const customConfigDir = `${homeDir}/custom-config`;
360+
onTestFinished(async () => {
361+
await rm(customConfigDir, { recursive: true, force: true }).catch(() => {});
362+
});
359363
const session = await client.createSession({
360364
onPermissionRequest: approveAll,
361365
configDir: customConfigDir,

test/snapshots/builtin_tools/should_find_files_by_pattern.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ conversations:
4646
- role: tool
4747
tool_call_id: toolcall_1
4848
content: |-
49-
./src/app.ts
5049
./src/index.ts
50+
./src/app.ts
5151
- role: assistant
5252
content: |-
5353
Found 2 TypeScript files:

0 commit comments

Comments
 (0)