jeudi 29 décembre 2016

List all mocha tests without executing them

Is there a way in mochajs to list all tests collected by test runner without executing them?

E.g. if the are specs that look like:

describe('First', function() {
    it('should test something', function() {
        ...
    })
});

describe('Second', function() {
    it('should test something else', function() {
        ...
    })
});

then I want to get console output similar to an output produced by test reporters, but without executing actual tests, like this:

First
    should test something
Second
    should test something else

Aucun commentaire:

Enregistrer un commentaire