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
{{ message }}
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
On a new Ember application created with Ember-CLI 2.7.0, if I run ember test the tests pass. But if I ember install ember-cli-mocha and then run ember test again, I get seven failures that all look mostly like:
not ok 1 PhantomJS 2.1 - TestLoader Failures ember-cli-mocha-test/tests/app.jshint: could not be loaded
---
message: >
Can't find variable: QUnit
stack: >
http://localhost:7357/assets/tests.js:4:8
exports@http://localhost:7357/assets/vendor.js:132:37
requireModule@http://localhost:7357/assets/vendor.js:32:25
require@http://localhost:7357/assets/test-support.js:14598:14
loadModules@http://localhost:7357/assets/test-support.js:14590:21
load@http://localhost:7357/assets/test-support.js:14620:33
http://localhost:7357/assets/test-support.js:14490:20
Log: |
Usually I use ember-cli-mirage with my Mocha tests as well, and when I install that, my tests all pass. I'm pretty new to Ember and I wasn't able to find a way to get the tests passing without installing Mirage.
Please let me know any other info I can provide to help!
The text was updated successfully, but these errors were encountered:
The issue is with running ember test with ember-cli-qunit which caches the JSHint/ESLint generated test files, then changing the test framework being used. At this point the cached ESLint/JSHint tests do not invalidate and get regenerated, so when you run ember test again the generated test files are still using QUnit instead of Mocha.
The short term solution is to rm -rf node_modules && npm install, but obviously that sucks. I'll try to get the time to fix it properly within the next week.
No worries, it's not holding me up—because I do use ember-cli-mirage and the issue doesn't come up when I'm using it (for reasons that are beyond my JS-fu), I'm not held up. And it's a sandbox app anyway 😇
On a new Ember application created with Ember-CLI 2.7.0, if I run
ember test
the tests pass. But if Iember install ember-cli-mocha
and then runember test
again, I get seven failures that all look mostly like:Usually I use
ember-cli-mirage
with my Mocha tests as well, and when I install that, my tests all pass. I'm pretty new to Ember and I wasn't able to find a way to get the tests passing without installing Mirage.Please let me know any other info I can provide to help!
The text was updated successfully, but these errors were encountered: