| 1 | import { assert, describe, it } from "@effect/vitest" |
| 2 | import { encodeAnyValue } from "effect/observability/internal/otlpProtobuf" |
| 3 | |
| 4 | describe("OtlpSerialization", () => { |
| 5 | it("encodes a negative protobuf int64 as a ten-byte varint", () => { |
| 6 | const encoded = encodeAnyValue({ intValue: -1 }) |
| 7 | assert.strictEqual(encoded.length, 11) |
| 8 | assert.deepStrictEqual(Array.from(encoded), [0x18, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01]) |
| 9 | }) |
| 10 | }) |