meteor-mocha
meteor-mocha copied to clipboard
Allow running specific server tests or hooks after client tests in full app mode
When running in full app mode, I'd like to do some global checks that need to wait for the client tests to run. For example:
- I might set the MongoDB profiling level to 2 before running client tests, then after client tests finish, complain if any query in the profile collection has
COLLSCAN
in the winning plan, as it means I'm missing a needed index. - I might do a
$indexStats
aggregation on each collection and complain if any index on the collection was never used, as it means I'm wasting database resources on unnecessary indexing.
This would require some way of running server code after the client tests finish. Using the describe
/it
language would be most convenient, but any way of running server code would be fine as long as I can cause the test run to fail.