-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Expected Behavior
zUnit-test
Summary
Tests: 0, Passed: 0, Failed: 0, Skipped: 0, Duration: 4ms
Current Behavior
node:internal/errors:490
ErrorCaptureStackTrace(err);
^
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file and data are supported by the default ESM
loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
at new NodeError (node:internal/errors:399:5)
at throwIfUnsupportedURLScheme (node:internal/modules/esm/resolve:1059:11)
at defaultResolve (node:internal/modules/esm/resolve:1135:3)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:838:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ESMLoader.import (node:internal/modules/esm/loader:525:22)
at importModuleDynamically (node:internal/modules/cjs/loader:1159:29)
at importModuleDynamicallyWrapper (node:internal/vm/module:429:21)
at importModuleDynamically (node:internal/vm:102:46) {
code: 'ERR_UNSUPPORTED_ESM_URL_SCHEME'
}
Node.js v18.14.0
ELIFECYCLE Test failed. See above for more details.
Possible Solution
Use String(url.pathToFileURL(filePath))
Steps to Reproduce
- Init new project.
- Run
npm i zunit --save-dev - Add
.zUnit.jswith such content:
const path = require("node:path");
module.exports = {
name: "zUnit-test",
directory: path.resolve('Domain'),
pattern: /\.(spec|test)\.js$/
}- Run
zUnit
Environment
- zUnit 4.0.2
- node 18.14.0
- Win 10
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels