Skip to content

Commit d5ca70f

Browse files
committed
test(core): release shell test locations
1 parent 3baaabe commit d5ca70f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

packages/core/test/tool-shell.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,11 @@ const withSession = <A, E, R>(directory: string, body: (registry: ToolRegistry.I
171171
})
172172
const locations = yield* LocationServiceMap.Service
173173
const locationLayer = locations.get(location)
174-
const registry = yield* ToolRegistry.Service.pipe(Effect.provide(locationLayer))
175-
yield* waitForTool(registry, ShellTool.name)
176-
return yield* body(registry).pipe(Effect.provide(locationLayer))
174+
return yield* Effect.gen(function* () {
175+
const registry = yield* ToolRegistry.Service
176+
yield* waitForTool(registry, ShellTool.name)
177+
return yield* body(registry)
178+
}).pipe(Effect.provide(locationLayer), Effect.ensuring(locations.invalidate(location)))
177179
})
178180

179181
describe("ShellTool", () => {

0 commit comments

Comments
 (0)