In mocha, I have a couple unit tests which use skip
it.skip('login (return photo)', function(done) { ...
However, in some cases, I want to force not skipping, like before a deployment. Is there a flag I can pass mocha to do so?
In mocha, I have a couple unit tests which use skip
it.skip('login (return photo)', function(done) { ...
However, in some cases, I want to force not skipping, like before a deployment. Is there a flag I can pass mocha to do so?
.skip
is provided as a way to omit a test without having to comment it out, potentially forgetting about it forever. You're probably better off conditionally registering the test yourself.
Perhaps something like this:
var isDev = process.env.NODE_ENV === 'development';
describe('stuff', function() {
if (!isDev) {
it('login (return photo)', function (done) { ... }
}
});