Skip to content

Commit d823fa4

Browse files
saphidclaude
andcommitted
test(pi): cover single-file extension names alongside folder index
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent a96ed80 commit d823fa4

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

‎packages/provider-pi/src/server/adapter.test.ts‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1523,7 +1523,10 @@ describe("PiAdapterV2", () => {
15231523
it.effect("gives notify and extension-error items distinct ids in each thread", () =>
15241524
Effect.gen(function* () {
15251525
const itemIds = new Set<string>();
1526-
for (const threadId of [THREAD_ID, ThreadId.make("thread-pi-test-2")]) {
1526+
for (const [threadId, extensionPath] of [
1527+
[THREAD_ID, "/ext/a.ts"],
1528+
[ThreadId.make("thread-pi-test-2"), "/ext/a/index.ts"],
1529+
] as const) {
15271530
const fake = yield* makeFakePi;
15281531
const { runtime, takeEvent } = yield* openRuntime(fake, "default", threadId);
15291532
const providerThread = yield* runtime.ensureThread({
@@ -1548,11 +1551,7 @@ describe("PiAdapterV2", () => {
15481551
method: "notify",
15491552
message: "note",
15501553
});
1551-
yield* fake.emit({
1552-
type: "extension_error",
1553-
extensionPath: "/ext/a/index.ts",
1554-
error: "boom",
1555-
});
1554+
yield* fake.emit({ type: "extension_error", extensionPath, error: "boom" });
15561555
for (const prefix of ["notify:", "extension-error:"]) {
15571556
const item = yield* takeEvent(
15581557
(event) =>

0 commit comments

Comments
 (0)