import { strict as assert } from "node:assert"; import { test } from "node:test"; import { expectTypeOf } from "expect-type"; import { getPrimitiveUnionMatcher, getPrimitiveUnionMatcherW, getTaggedUnionMatcher, getTaggedUnionMatcherW, } from "./index.ts"; // The published entry point is the barrel (`package.json` exports // `./dist/index.js`), so every factory must be reachable from here. Importing it // also loads the module, which is what lets c8's `--all` measure it — see // development/ci.md § Coverage threshold. test("index: the public entry point re-exports every matcher factory", () => { // Assert expectTypeOf(getPrimitiveUnionMatcher).toBeFunction(); assert.equal(typeof getPrimitiveUnionMatcher, "function"); expectTypeOf(getPrimitiveUnionMatcherW).toBeFunction(); assert.equal(typeof getPrimitiveUnionMatcherW, "function"); expectTypeOf(getTaggedUnionMatcher).toBeFunction(); assert.equal(typeof getTaggedUnionMatcher, "function"); expectTypeOf(getTaggedUnionMatcherW).toBeFunction(); assert.equal(typeof getTaggedUnionMatcherW, "function"); });