Mocha tests not working after upgrade to 1.6


#1

I’ve just upgraded to Meteor 1.6 and now my tests won’t work in the browser.

The following command:

meteor test --driver-package practicalmeteor:mocha --port 3100

Gives the following error in the dev console:

index.js:11 Uncaught TypeError: MochaRunner.runEverywhere is not a function
    at Object.runTests (index.js:11)
    at meteor.js?hash=6d285d84547b3dad9717a7c89c664b61b45ea3d8:1040
    at maybeReady (meteor.js?hash=6d285d84547b3dad9717a7c89c664b61b45ea3d8:821)
    at HTMLDocument.loadingCompleted (meteor.js?hash=6d285d84547b3dad9717a7c89c664b61b45ea3d8:833)

However, the test run OK with phantom js.

Any suggestions as to what the problem might be?


#2

Upgrade to meteortesting:mocha and try again


#3

Thanks for that. I also needed to remove both disptach:mocha and practicalmeteor:mocha for it to work, but I’m there now.

It’s a shame we don’t see server tests in the browser anymore, but I’m just glad it works.


#4

It’s strange that this isn’t mentioned in the changelog of 1.6, although the impact can be big for heavy mocha users.

It’s also strange that without updating to 1.6 the new meteor-tool downloads in the background breaking existings tests.

I’ll file an issue once I’m on my laptop.


#5

Thanks for the hint!

Just like to mention that this doesn’t solve meteor test-packages:


#6

I updated the meteor coffee script package to the very latest and it works even with the older practicalmeteor:mocha package.


#7

Awesome, thanks!

This worked for me:

Further test setup can be found here:


#8

Thanks for this. Worked for me too. Updated coffeescript with ‘meteor update coffeescript’ and practicalmeteor:mocha came back to life.


#9

Yes, for me too. Thanks so much for the solution. (That one drove me crazy) :smile: