Skip to content

Commit

Permalink
Fix: Windows needs file: for absolute URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Jul 10, 2021
1 parent cc9201d commit 8f4da05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/lib/config-array-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//-----------------------------------------------------------------------------

import path from "path";
import { fileURLToPath } from "url";
import { fileURLToPath, pathToFileURL } from "url";
import fs from "fs";
import { createRequire } from "module";
import { assert } from "chai";
Expand Down Expand Up @@ -921,7 +921,7 @@ describe("ConfigArrayFactory", () => {
assertConfigArrayElement(configArray[0], {
name: ".eslintrc » eslint:all",
filePath: eslintAllPath,
...(await import(eslintAllPath)).default
...(await import(pathToFileURL(eslintAllPath))).default
});
});

Expand Down Expand Up @@ -951,7 +951,7 @@ describe("ConfigArrayFactory", () => {
assertConfigArrayElement(configArray[0], {
name: ".eslintrc » eslint:recommended",
filePath: eslintRecommendedPath,
...(await import(eslintRecommendedPath)).default
...(await import(pathToFileURL(eslintRecommendedPath))).default
});
});

Expand Down

0 comments on commit 8f4da05

Please sign in to comment.