Skip to content

Commit 9052ec9

Browse files
committed
test: migrate isTypeScriptFile to node test runner
1 parent c23c793 commit 9052ec9

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed
Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
import { describe, expect, it } from "vitest";
1+
import { strictEqual } from "node:assert";
2+
import { describe, it } from "node:test";
23

34
import { isTypeScriptFile } from "./isTypeScriptFile";
45

56
describe(isTypeScriptFile.name, () => {
6-
it.each([
7+
for (const [output, input] of [
78
[true, "foo.ts"],
89
[true, "foo.tsx"],
910
[false, "foo.js"],
1011
[false, "foo.jsx"],
11-
])("should return %b for %s", (output, input) => {
12-
expect(isTypeScriptFile(input)).toBe(output);
13-
});
12+
] as const) {
13+
it(`should return ${output} for ${input}`, () => {
14+
strictEqual(isTypeScriptFile(input), output);
15+
});
16+
}
1417
});

0 commit comments

Comments
 (0)