Reputation: 188
I'm writing a test suite for a meteor application. I use practicalmeteor:mocha
package to run the tests. Meteor tests are run using the commandline meteor test --driver-package practicalmeteor:mocha
.
My tests are placed in $PROJECT/test/unit/client/
and $PROJECT/test/unit/server/
. The server tests are being identified and run, whereas client tests aren't run. Any meteor devs who faced the same problem? I know mocha allows mocha --recursive
but I'm not sure how to specify that in a meteor test
command.
Upvotes: 4
Views: 1109
Reputation: 3335
If you mean that meteor does not even load your tests (try with an intentional syntax error in them to see if you get compilation errors) it might be that Meteor has configured itself to run tests only in some file. E.g in package.json
I had
testModule: test/main.js
It seems that this causes Meteor to not follow its documented rules for finding tests and only loads this module.
Try removing this configuration to get default behaviour, or point it to your main test module (which then needs to pull in other tests).
NB. I think you should use meteortesting:mocha
nowadays...
Upvotes: 5