permb
May 26, 2020, 2:35pm
1
I have a Typescript-based Meteor 1.10-based app that has only server-side (mostly API) tests and it annoys me that I have to change the test files themselves to make tests re-run in watch mode.
Is there any setting for this so that tests re-run when ANY file has changed?
Here’s the command I use:
TEST_WATCH=1 TEST_CLIENT=0 MOCHA_TIMEOUT=60000 meteor test --raw-logs --driver-package meteortesting:mocha --inspect=9229 --exclude-archs web.browser,web.browser.legacy
Currently I add a comment in my .tests.ts file to force the test to re-run after I’ve changed some source file in imports/ or server/ but it’s no fun.
permb
May 27, 2020, 1:58pm
2
Filed an issue with the mocha testing package in case that’s where the issue lies:
opened 12:17PM - 27 May 20 UTC
closed 09:25AM - 28 May 20 UTC
Meteor 1.10.2, Typescript 3.9.2 using the refapp:meteor-typescript@0.1.0 compile… r
Command line:
`TEST_WATCH=1 TEST_CLIENT=0 MOCHA_TIMEOUT=60000 meteor test --raw-logs --driver-package meteortesting:mocha --inspect=9229 --exclude-archs web.browser,web.browser.legacy`
If I work test-driven so that I have a failing test and then implement the functionality in server/... then Meteor will recompile and restart the server but tests are not re-run.
I need to manually modify the xxx.tests.ts file to force the tests to run again which is a lot of pain (I usually add just a line comment).
How can I change the behaviour so that tests are run again whenever Meteor restarts?