MCPcopy Create free account
hub / github.com/Effect-TS/effect / assertSampled

Function assertSampled

packages/effect/test/http/HttpTraceContext.test.ts:9–14  ·  view source on GitHub ↗
(headers: Record<string, string>, sampled: boolean)

Source from the content-addressed store, hash-verified

7const spanId = "e457b5a2e4d86bd1"
8
9const assertSampled = (headers: Record<string, string>, sampled: boolean) => {
10 const span = Option.getOrThrow(HttpTraceContext.fromHeaders(Headers.fromInput(headers)))
11 strictEqual(span.traceId, traceId)
12 strictEqual(span.spanId, spanId)
13 strictEqual(span.sampled, sampled)
14}
15
16describe("HttpTraceContext", () => {
17 describe("fromHeaders", () => {

Callers 1

Calls 1

strictEqualFunction · 0.90

Tested by

no test coverage detected