Testing individual *test[s].js files with meteor test command

Hello Meteor forum,

My team and I have been doing a lot of unit tests, and with the nature of unit tests, they are isolated and independent of each other. That being said, we have quite a bit, and running the entirety of our tests takes roughly 20s. It isn’t a long amount of time, but when you’re just trying to run a specific test, it can be a bit frustrating.

I know that vanilla mocha has the ability to grep file names like
$ mocha --grep login.tests.js
and run only those tests.

Does anyone know of a work-around using meteor test or similar in their workflow?



describe.only, it.only

1 Like

Ah, I should have read into that more. Thanks!

Is it only me that has trouble with running describe.only? It seems to have no effect, whereas describe.skip works as expected. I’m using it for full-app testing mode.

1 Like

Actually, no, I had trouble using describe only? only the tests. Ended up putting describe.skip everywhere besides the tests that were pertinent.

1 Like

Yes, I’m having the same trouble as you @mordka