Reputation: 3335
I'm on Meteor 1.7.0.3 and want to write unittests.
I have the standard tests/main.js
with a few tests which runs for meteor test --driver-package meteortesting:mocha --once
from the command line.
However, code in a new file named my.tests.js
is not picked up, no matter where I put it.
The Meteor testing guide explicitly states
- Does eagerly load any file in our application (including in imports/ folders) that look like .test[s]., or .spec[s].
Is there some configuration that I have missed?
Upvotes: 5
Views: 365
Reputation: 3335
By default Meteor sets
"testModule": "tests/main.js"
in package.json
. This defines the entry point for meteor test
. This is why the tests in it gets run, contrary to what the testing guide indicates.
By removing this configuration, Meteor starts to behave as documented in the testing guide.
Upvotes: 6