-
Notifications
You must be signed in to change notification settings - Fork 146
Closed
Labels
Description
Are you creating an issue in the correct repository?
I hope so. Only the core jasmine
dependency is used to reproduce this.
Expected Behavior
Spec files with the .jsx
extension should be loadable by jasmine@4
when used with babel
.
Current Behavior
Trying to load a .jsx
file throws:
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".jsx" for /home/projects/node-pmddnq/spec/jsx.spec.jsx
at Loader.t.defaultGetFormat [as _getFormat] (https://node-pmddnq.w.staticblitz.com/blitz.bc2b78560fa0e6097e7f69d4e820659cab64d2c5.js:6:731743)
at Loader.getFormat (https://node-pmddnq.w.staticblitz.com/blitz.bc2b78560fa0e6097e7f69d4e820659cab64d2c5.js:6:865150)
at Loader.getModuleJob (https://node-pmddnq.w.staticblitz.com/blitz.bc2b78560fa0e6097e7f69d4e820659cab64d2c5.js:6:866865)
at Loader.import (https://node-pmddnq.w.staticblitz.com/blitz.bc2b78560fa0e6097e7f69d4e820659cab64d2c5.js:6:865920)
at Jasmine._loadFiles (/home/projects/node-pmddnq/node_modules/jasmine/lib/jasmine.js:215:5)
at Jasmine.loadSpecs (/home/projects/node-pmddnq/node_modules/jasmine/lib/jasmine.js:206:3)
at Jasmine.execute (/home/projects/node-pmddnq/node_modules/jasmine/lib/jasmine.js:502:3)
at runJasmine (/home/projects/node-pmddnq/node_modules/jasmine/lib/command.js:158:5)
at Command.run (/home/projects/node-pmddnq/node_modules/jasmine/lib/command.js:57:9) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
Possible Solution
Not sure. This wasn't a problem in [email protected]
, so maybe the new ESM changes in jasmine@4
are causing it?
Suite that reproduces the behavior (for bugs)
https://stackblitz.com/edit/node-pmddnq?file=README.md
Context
Makes v4 somewhat un-useable for React projects.
Your Environment
- Version used: 4.0.0
- Environment name and version (e.g. Chrome 39, node.js 5.4): Node 16.13.1
- Operating System and version (desktop or mobile): MacOS
- Link to your project: https://stackblitz.com/edit/node-pmddnq?file=README.md