However, the code inside the component.create(bootstrap).then() block does not execute. As a consequence of the component creation failing, component.dispose(); also fails, since it cannot dispose of a component that has not been created.
Using Chrome, the console displays ‘Uncaught (in promise) Error: Unable to find module with ID: aurelia-pal-browser’.
We are unable to resolve this. The platform is Windows 10, and we are using aurelia-testing (1.0.0-beta.4.0.0) and aurelia-pal-browser (1.8.0).
There’s no functional difference with that change in. Still get the same error.
I don’t believe it is the test example code. I think the framework has an issue for some reason. Here’s the error and last part of the stack trace (i.e. framework code issuing the error).
Has anybody ever got the aurelia-testing to work with Jasmine/Karma, and is anyone actually actively using it to verify their software with a good degree of success?
Yes. I did have some pain to get it working - early versions of the aurelia-testing did not play nicely with Webpack, Validation plugin, etc. But it all appears to be solved now. The only thing that causes some issues today is that Aurelia Store plugin annotations mess around with the loading lifecycle - but you can work around that.
Saying that, I’ve recently dumped Jasmine/Karma for Jest. Seems a bit easier to work with.
I just want to point out that you don’t necessarily need aurelia-cli to run your test. You just need to setup the karma, webpack, and jasmine correctly.
This repo is an example a working setup. Pay special attention to the karma.conf.js, tests/karma-bundle.js, and tests/webpack.config.js (based on the generated project by aurelia-cli). Note that this is just an example, and you can modify the dependencies as per your need.