mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-17 05:09:24 +08:00
24 lines
634 B
TypeScript
24 lines
634 B
TypeScript
// The TestContext surface: t.name reads the test's own name, t.diagnostic
|
||
// queues ℹ lines after the result line, and t.skip/t.todo mark the
|
||
// RUNNING test (the body keeps executing — skipped-by-t.skip counts
|
||
// skipped even though it ran).
|
||
import assert from "node:assert";
|
||
import { test } from "node:test";
|
||
|
||
test("knows its name", (t) => {
|
||
assert.strictEqual(t.name, "knows its name");
|
||
});
|
||
|
||
test("emits diagnostics", (t) => {
|
||
t.diagnostic("first note");
|
||
t.diagnostic("second note");
|
||
});
|
||
|
||
test("skips itself", (t) => {
|
||
t.skip("decided at runtime");
|
||
});
|
||
|
||
test("todos itself", (t) => {
|
||
t.todo("revisit this one");
|
||
});
|