-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing Components is out of sync with latest Aurelia #441
Comments
Removed inform box specific to Karma as there is no documentation at all about how to set Karma up. Fixes aurelia#441
The discourse topic https://discourse.aurelia.io/t/aurelia-testing-with-jasmine-karma-fails/1629 is probably out of date too but I found it while looking at solutions to the failures. |
I get the same error when trying the custom attribute section.
|
The problem with this one is that jest and karma have different base setups. So when you scaffold a fresh project with Karma as unit tester the configuration's If we remove the infobox all will still work for jest users, but karma users will be buffled why nothing works. @3cp any ideas how to go on with this? I see there would be quite some changes involved to modify Karma's default to use src as a base and frankly I think the Karma setup is even nicer compared to Jest because I personally feel that it's more clear that you're always kinda starting from the root of your project-folder |
I'd love to see docs on setting up Karma, and in fact expected to see that as I've been reading from front-to-back the documentation and I vaguely remember the bias to Karma over Jest. Yet now that I go to find a reference to support that I can't find it. Maybe its in one of the videos I've watched, or some blog post of Rob's. I've really appreciated the extra level of detail that Aurelia has on ensuring not just the code is working but the surrounding software development practices as well. And providing an opinionated view on how to solve these problems. It's has been useful as a rosetta stone to take the practices I would normally use in a Java project and map them into Aurelia. Other JavaScript frameworks haven't gone this extra mile when writing their documentation. |
I'm submitting a bug report
https://aurelia.io/docs/testing/components#testing-a-custom-element
"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 errorExpected/desired behavior:
It should be looking for the component in
src/my-component
and nottest/unit/src/my-component
Changing the line
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 usesrc/
, and justmy-component
." It looks like for the default out-of-the-box that thesrc/
prefix is not needed now for the default Jest configuration.The text was updated successfully, but these errors were encountered: