From 3db3c7e2856e59934e99c701092bd06f736b271d Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Sat, 3 Jul 2021 17:50:57 +0800 Subject: [PATCH] Fix: Windows needs file: for absolute URLs --- tests/lib/config-array-factory.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/lib/config-array-factory.js b/tests/lib/config-array-factory.js index 081a54f2..1db5ed97 100644 --- a/tests/lib/config-array-factory.js +++ b/tests/lib/config-array-factory.js @@ -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"; @@ -914,7 +914,7 @@ describe("ConfigArrayFactory", () => { assertConfigArrayElement(configArray[0], { name: ".eslintrc » eslint:all", filePath: eslintAllPath, - ...(await import(eslintAllPath)).default + ...(await import(pathToFileURL(eslintAllPath))).default }); }); @@ -944,7 +944,7 @@ describe("ConfigArrayFactory", () => { assertConfigArrayElement(configArray[0], { name: ".eslintrc » eslint:recommended", filePath: eslintRecommendedPath, - ...(await import(eslintRecommendedPath)).default + ...(await import(pathToFileURL(eslintRecommendedPath))).default }); });