mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-17 05:09:24 +08:00
16 lines
400 B
TypeScript
16 lines
400 B
TypeScript
// @exit: 1
|
|
// Sync bodies: passes report ✔, a throwing body reports ✖, lands in the
|
|
// failing-tests section with its message, and fails the process.
|
|
import { test } from "node:test";
|
|
|
|
test("first passes", () => {
|
|
const x = 2 + 2;
|
|
if (x !== 4) throw new Error("math broke");
|
|
});
|
|
|
|
test("second fails", () => {
|
|
throw new Error("deliberate failure");
|
|
});
|
|
|
|
test("third still runs", () => {});
|