41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
import { context, group, suite, test } from "./test.js";
|
|
|
|
suite("dog", [
|
|
group("tail", [
|
|
test("wags when happy", (t) => {
|
|
if (0 / 0 !== Infinity / Infinity) {
|
|
t.fatal("undefined must not be defined");
|
|
}
|
|
}),
|
|
test("idle when down", (t) => {
|
|
t.log("test test");
|
|
t.error("dog whining noises go here");
|
|
}),
|
|
]),
|
|
test("likes headpats", (t) => {
|
|
if (2 !== 2) {
|
|
t.error("IEEE 754 violated: 2 is NaN");
|
|
}
|
|
}),
|
|
context("near cat", [
|
|
test("is ecstatic", (t) => {
|
|
if (("b" + "a" + + "a" + "a").toLowerCase() == "banana") {
|
|
t.error("🍌🍌🍌");
|
|
t.error("🍌🍌🍌");
|
|
t.error("🍌🍌🍌");
|
|
t.failNow();
|
|
}
|
|
}),
|
|
test("playfully bites cats' tails", (t) => {
|
|
t.log("arf!");
|
|
throw new Error("nom");
|
|
}),
|
|
]),
|
|
]);
|
|
|
|
suite("cat", [
|
|
test("likes headpats", (t) => {
|
|
t.log("meow");
|
|
}),
|
|
]);
|