Skip to content
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

[wip] Make mocha work with ember-exam v3 #259

Closed
wants to merge 1 commit into from

Conversation

step2yeung
Copy link
Collaborator

@step2yeung step2yeung commented Apr 12, 2019

Problem:
There is no test-loader in the latest release of ember-mocha. Hence users are seeing the following error in the browser console error:

Uncaught Error: Unable to find a suitable test loader. You should ensure that 
one of `ember-qunit` or `ember-mocha` are added as dependencies. at 
http://localhost:7357/assets/test-support.js, line 51528

reference: #238

Fix:

  • Change getTestLoader() to search for ember-mocha or ember-qunit from require
  • Change ember-exam-mocha-test-loader to extend from ember-cli-test-loader instead of ember-mocha/test-loader which has not been released yet

Other work:

  • move loadTests back to load.js

Tests:

  • Test with Ghost-admin
  • Add test that tests all ember-exam features against mocha

@step2yeung step2yeung changed the title Make mocha work with ember-exam v3 [wip] Make mocha work with ember-exam v3 Apr 13, 2019
@step2yeung
Copy link
Collaborator Author

This won't work since tests are being ran twice, one by calling start() here, another time by autostart from ember-mocha. The only way this will work is to re-introduce monkey-patching of ember-cli-test-loader, which we moved away from in v3.
Mitigation is to use < v3.0 of ember-exam

@step2yeung step2yeung closed this Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant