blob: 5da55261927d1c2ebd9761f154b9149de0df6bdb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
import assert from "node:assert/strict";
import process from "node:process";
import { runTests } from "./driver.js";
const err = x => process.stderr.write(x);
const red = s => `\x1b[31m${s}\x1b[0m`;
const green = s => `\x1b[32m${s}\x1b[0m`;
const yellow = s => `\x1b[33m${s}\x1b[0m`;
const conf = {
err,
assert,
colors: {
red,
green,
yellow,
},
};
const main = async (path = process.argv[2]) => {
const module = await import("../" + path);
await runTests(conf, module.allTests);
};
await main();
|