Skip to content

Commit

Permalink
test: test resporter is not supported in v16
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushmanchhabra committed Oct 20, 2023
1 parent e7c3947 commit b82fd29
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions test/e2e/index.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
import { resolve } from "node:path";
import { stdout, version } from "node:process";
import { run } from "node:test";
import { tap } from "node:test/reporters";

let tests = [
resolve("test", "e2e", "addon.js"),
resolve("test", "e2e", "mode.js"),
];
await executeTests();

if (version.startsWith("v16")) {
run({
files: tests,
});
} else {
run({
files: tests,
})
.compose(tap)
.pipe(stdout);
}
async function executeTests() {
let tests = [
resolve("test", "e2e", "addon.js"),
resolve("test", "e2e", "mode.js"),
];

if (version.startsWith("v16")) {
run({
files: tests,
});
} else {
const { tap } = await import("node:test/reporters");

run({
files: tests,
})
.compose(tap)
.pipe(stdout);
}
}

0 comments on commit b82fd29

Please sign in to comment.