I would like to specify some utility code for my tests as functions that can only run in test mode (when meteor.isTest is true).
However I would like to avoid to have to put an if (Meteor.isTest) on every function.
I would rather, similarly to what is possible with isClient and isServer, have a folder path that would prevent the code to be loaded/executed if meteor is not in test mode.
Client and server have the “client” and 'server" folder convetions.
Basically I would like the same for testing code so that it only can get executed during test mode.
Meteor does provide a “tests” special folder path, however that one basically prevents loading completely as it is meant to be used for external (outside of meteor) tests.
So is there a way to achieve what I want without having to manually specifiy Meteor.isTest everywhere?