test/tests/assertions.ts

20 lines
550 B
TypeScript
Raw Normal View History

import {setup} from "../source/index.js";
await setup("Assertions", async (group) => {
group.test("equals", async (test) => {
test.equals(true, true, "boolean");
test.equals(Math.PI, Math.PI, "number");
test.equals("A string!", "A string!", "string");
});
2022-12-27 20:03:27 +00:00
group.test("false", async (test) => {
test.false(1 < 0, "logic");
test.false(new Date() instanceof String, "instanceof");
});
group.test("true", async (test) => {
test.true(1 > 0, "logic");
test.true(new Date() instanceof Date, "instanceof");
});
});