diff --git a/lib/reporters.js b/lib/reporters.js index 6a87724..0f50859 100644 --- a/lib/reporters.js +++ b/lib/reporters.js @@ -4,13 +4,7 @@ import { fileURLToPath } from 'node:url' function normalizeFile (file, cwd) { let res = file if (file.startsWith('file://')) { - try { - res = fileURLToPath(new URL(file)) - } catch (err) { - if (err.code === 'ERR_INVALID_FILE_URL_PATH') { - res = fileURLToPath(new URL(file.replace('file:///', 'file://'))) - } - } + res = fileURLToPath(file) } res = res.replace(cwd, '') if (res.startsWith('/') || res.startsWith('\\')) {