Open
Description
I'm submitting a bug report
https://aurelia.io/docs/testing/components#testing-a-custom-element
- Library Version:
"aurelia-cli": "^1.0.2",
Current behavior:
After running au new
and pasting in the examples from the testing component page they fail with the error
FAIL src/my-component.spec.js (5.961s)
● Console
console.error internal/process/next_tick.js:68
{ Error: Cannot find module 'C:\path\to\project\test\unit\src\my-component' from 'aurelia-loader-nodejs.js'
Expected/desired behavior:
It should be looking for the component in src/my-component
and not test/unit/src/my-component
Changing the line
- .withResources('src/my-component')
+ .withResources('my-component')
Fixed the problem.
Note there is an info box for Karma that says "If you are using karma
and your configuration already has a path for '*': 'src/*'
set you may not need to use src/
, and just my-component
." It looks like for the default out-of-the-box that the src/
prefix is not needed now for the default Jest configuration.
Metadata
Metadata
Assignees
Labels
No labels