mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-30 02:53:07 +00:00
test(core): isolate transport metrics (#45688)
This commit is contained in:
parent
facd7ff452
commit
0362ef48ff
1 changed files with 6 additions and 3 deletions
|
|
@ -857,8 +857,7 @@ describe("SessionModelTransport", () => {
|
|||
test("records metadata-only lifecycle metrics", async () => {
|
||||
const fixture = automatic()
|
||||
|
||||
await run(
|
||||
fixture.connector,
|
||||
await Effect.runPromise(
|
||||
Effect.gen(function* () {
|
||||
const transport = yield* SessionModelTransport.Service
|
||||
const executor = transport.bind(session)
|
||||
|
|
@ -874,7 +873,11 @@ describe("SessionModelTransport", () => {
|
|||
)
|
||||
expect(JSON.stringify(lifecycle)).not.toContain("secret-one")
|
||||
expect(JSON.stringify(lifecycle)).not.toContain("secret-two")
|
||||
}),
|
||||
}).pipe(
|
||||
Effect.provide(SessionModelTransport.makeLayer(fixture.connector)),
|
||||
Effect.scoped,
|
||||
Effect.provideService(Metric.MetricRegistry, new Map()),
|
||||
),
|
||||
)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue