How to make `it.only` environment-aware using mocha?
问题 Mocha supports it.only syntax to reduce the amount of tests to run. In our team, a developer might use it.only temporally within a code base. Now it happened that such an only test was approved and deployed by accident. This led the build server to happily run only one test and to declare that build a success. My question now becomes: Is there a way to tell mocha: It should only allow only on a developer's machine? Can it be make environment aware so that either all tests always run on a