ember-exam icon indicating copy to clipboard operation
ember-exam copied to clipboard

2.1.x does not work with latest stable ember-mocha release

Open kevinansfield opened this issue 5 years ago • 9 comments

I've added the start() call from ember-exam to our test-helper.js file (even though the current ember-mocha release doesn't use an explicit start() call) which allows our tests to run but I still get this error when attempting to run our test suite and parallelization doesn't occur:

Global 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.

Looking at the getTestLoader() code here it's checking for the existence of ember-mocha/test-loader but ember-mocha does not have such an export or file.

[email protected] [email protected]

kevinansfield avatar Apr 01 '19 15:04 kevinansfield

@kevinansfield Thanks for filing this issue! It looks like you were getting this error with TryGhost/Ghost-Admin ? Could you share the exact steps to produce this error?

step2yeung avatar Apr 01 '19 21:04 step2yeung

I was able to reproduce this. The problem is due to test-loader is available on master, but not in the releases yet. Will be addressing this

step2yeung avatar Apr 02 '19 05:04 step2yeung

I don't use ember-mocha, but might I be experiencing the same/similar issue?

not ok 1 Chrome 73.0 - [undefined ms] - Global error: Uncaught TypeError: (0 , _load.default) is not a function at http://localhost:7357/assets/tests-dev.js, line 48328
    ---
        Log: |
            { type: 'error',
              testContext: {},
              text:
               'Uncaught TypeError: (0 , _load.default) is not a function at http://localhost:7357/assets/tests-dev.js, line 48328\n' }
    ...

...downgrading to ember-exam 2.0.3 works ok

amk221 avatar Apr 02 '19 11:04 amk221

@amk221 ember-exam 2.1.2 removed the load API and instead introduces the start() API Please see the Read me for how to set this up.

step2yeung avatar Apr 02 '19 15:04 step2yeung

Oh, sorry - I did check the changelog, but it's not mentioned.

amk221 avatar Apr 02 '19 15:04 amk221

@amk221 no worries, what you faced is reasonable since it was a breaking change that was introduced into a minor version bump. #242 will fix this. So you can use load() instead.

step2yeung avatar Apr 04 '19 18:04 step2yeung

https://github.com/ember-cli/ember-exam/pull/242 Was merged and released.

stefanpenner avatar Apr 06 '19 13:04 stefanpenner

I'm still seeing this issue with [email protected] and [email protected] after updating the test-helper.js file.

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

maprules1000 avatar Apr 09 '19 17:04 maprules1000

@maprules1000 Apologies! I think this needs to be addressed, since the changes in 3.0.1 was working with the master of ember-mocha rather than the latest release of ember-mocha 0.14.0 Lets reopen this ticket.

step2yeung avatar Apr 09 '19 17:04 step2yeung