|
1 | | -"use strict"; |
| 1 | +import { describe, it } from "node:test"; |
| 2 | +import { fileURLToPath } from "node:url"; |
| 3 | +import { expect } from "expect"; |
| 4 | +import { normalizeStderr, testBin } from "../helpers/test-bin.js"; |
| 5 | +import portsMap from "../ports-map.js"; |
2 | 6 |
|
3 | | -const { describe, it } = require("node:test"); |
4 | | -const { expect } = require("expect"); |
5 | | -const { normalizeStderr, testBin } = require("../helpers/test-bin"); |
6 | | -const port = require("../ports-map")["cli-colors"]; |
| 7 | +const port = portsMap["cli-colors"]; |
7 | 8 |
|
8 | | -const colorsDefaultStats = require.resolve( |
9 | | - "../fixtures/cli-colors-default-stats/webpack.config", |
| 9 | +const colorsDefaultStats = fileURLToPath( |
| 10 | + import.meta.resolve("../fixtures/cli-colors-default-stats/webpack.config.js"), |
10 | 11 | ); |
11 | | -const colorsDisabled = require.resolve( |
12 | | - "../fixtures/cli-colors-disabled/webpack.config", |
| 12 | +const colorsDisabled = fileURLToPath( |
| 13 | + import.meta.resolve("../fixtures/cli-colors-disabled/webpack.config.js"), |
13 | 14 | ); |
14 | | -const colorsEnabled = require.resolve( |
15 | | - "../fixtures/cli-colors-enabled/webpack.config", |
| 15 | +const colorsEnabled = fileURLToPath( |
| 16 | + import.meta.resolve("../fixtures/cli-colors-enabled/webpack.config.js"), |
16 | 17 | ); |
17 | 18 |
|
18 | 19 | describe("colors", () => { |
|
0 commit comments