Specify runtime exports (#10853)
This commit is contained in:
15
test/esm/test-runner.mjs
Normal file
15
test/esm/test-runner.mjs
Normal file
@@ -0,0 +1,15 @@
|
||||
import chalk from "chalk";
|
||||
|
||||
export default async function testRunner({ title, testcases }) {
|
||||
console.log(title);
|
||||
const indent = " ";
|
||||
for (const [subtitle, testcase] of testcases) {
|
||||
try {
|
||||
await testcase();
|
||||
console.log(chalk.green(indent + "✓ " + subtitle));
|
||||
} catch (e) {
|
||||
console.log(chalk.red(indent + "✗ " + subtitle));
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user