t3-code-android-nightly/.repos/effect-smol/packages/tools/api-diff/test/Report.test.ts
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00

26 lines
862 B
TypeScript

import type { ApiDiff } from "@effect/api-diff/Model"
import { renderMarkdownReport } from "@effect/api-diff/Report"
import { assert, describe, it } from "@effect/vitest"
describe("API diff report", () => {
it("classifies effect/http-api as unstable", () => {
const diff: ApiDiff = {
version: 1,
base: { ref: "base", sha: "a".repeat(40) },
head: { ref: "head", sha: "b".repeat(40) },
changes: [{
id: "http-api-change",
classification: "api-added",
confidence: 1,
headApiId: "effect/http-api#endpoint#value",
authoritative: true
}]
}
const report = renderMarkdownReport(diff)
assert(report.includes("| unstable/http-api | effect/http-api | 1 |"))
assert(report.includes("\n## Unstable API changes\n"))
assert(!report.includes("\n## Stable API changes\n"))
})
})