Skip to content

Commit 172a5cf

Browse files
test: fix more
1 parent 3b9dbb4 commit 172a5cf

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

test/build/config-format/typescript-ts-node-loader/typescript.test.js renamed to test/build/config-format/typescript-ts-node-loader/typescript.test.mjs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
const { existsSync } = require("node:fs");
2-
const { resolve } = require("node:path");
3-
const { run } = require("../../../utils/test-utils");
1+
import { existsSync } from "node:fs";
2+
import { dirname, resolve } from "node:path";
3+
import { fileURLToPath } from "node:url";
4+
import { run } from "../../../utils/test-utils.js";
5+
6+
const __filename = fileURLToPath(import.meta.url);
7+
const __dirname = dirname(__filename);
48

59
describe("webpack cli", () => {
610
it("should support typescript esnext file", async () => {

test/build/config-format/typescript-using-nodejs/typescript.test.js renamed to test/build/config-format/typescript-using-nodejs/typescript.test.mjs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
const { existsSync } = require("node:fs");
2-
const { resolve } = require("node:path");
3-
const { run } = require("../../../utils/test-utils");
1+
import { existsSync } from "node:fs";
2+
import { dirname, resolve } from "node:path";
3+
import { fileURLToPath } from "node:url";
4+
import { run } from "../../../utils/test-utils.js";
5+
6+
const __filename = fileURLToPath(import.meta.url);
7+
const __dirname = dirname(__filename);
48

59
describe("webpack cli", () => {
610
it("should support typescript esnext file", async () => {

0 commit comments

Comments
 (0)