You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use the --loader=testdouble with mocha, I get an ERR_UNKNOWN_FILE_EXTENSION as described in nodejs/node#34049. I guess because mocha does not have an extension and testdouble tries to load it somehow?
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ""for /app/node_modules/mocha/bin/mocha
at new NodeError (internal/errors.js:322:7)
at defaultGetFormat (internal/modules/esm/get_format.js:71:15)
at getFormat (file:///app/node_modules/quibble/lib/quibble.mjs:65:12)
at Loader.getFormat (internal/modules/esm/loader.js:105:42)
at Loader.getModuleJob (internal/modules/esm/loader.js:243:31)
at async Loader.import (internal/modules/esm/loader.js:177:17)
at async Object.loadESM (internal/process/esm_loader.js:68:5) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
Environment
node -v output: v14.18.2
npm -v (or yarn --version) output: 6.14.15
npm ls testdouble (or yarn list testdouble) version: testdouble@3.16.3
Also tested with:
node -v output: v17.2.0
npm -v (or yarn --version) output: 8.1.4
npm ls testdouble (or yarn list testdouble) version: testdouble@3.16.3
Yup, you linked to the right issue. This is a problem in Node.js, and not in testdouble. I've never had a problem because I use mocha --loader=testdouble , and that works well.
Description
If I use the --loader=testdouble with mocha, I get an ERR_UNKNOWN_FILE_EXTENSION as described in nodejs/node#34049. I guess because mocha does not have an extension and testdouble tries to load it somehow?
Issue
Using any of:
node --loader=testdouble ./node_modules/.bin/mocha
NODE_OPTIONS='--loader=testdouble' ./node_modules/.bin/mocha
NODE_OPTIONS='--loader=testdouble' npx mocha
yields the following error:
Environment
node -v
output: v14.18.2npm -v
(oryarn --version
) output: 6.14.15npm ls testdouble
(oryarn list testdouble
) version: testdouble@3.16.3Also tested with:
node -v
output: v17.2.0npm -v
(oryarn --version
) output: 8.1.4npm ls testdouble
(oryarn list testdouble
) version: testdouble@3.16.3Failing Test
The text was updated successfully, but these errors were encountered: