diff --git a/index.js b/index.js index 914bfb3..9643497 100644 --- a/index.js +++ b/index.js @@ -68,7 +68,7 @@ function exit() { } globals.setImmediate(function () { - var numberOfTests = runner.select({type: 'test', skipped: false}).length; + var numberOfTests = runner.select({type: 'test'}).length; if (numberOfTests === 0) { send('no-tests', {avaRequired: true}); diff --git a/test/api.js b/test/api.js index 052e10e..2689302 100644 --- a/test/api.js +++ b/test/api.js @@ -475,3 +475,15 @@ test('caching can be disabled', function (t) { t.end(); }); }); + +test('test file with only skipped tests does not create a failure', function (t) { + t.plan(2); + + var api = new Api([path.join(__dirname, 'fixture/skip-only.js')]); + + api.run() + .then(function () { + t.is(api.tests.length, 1); + t.true(api.tests[0].skip); + }); +}); diff --git a/test/fixture/skip-only.js b/test/fixture/skip-only.js new file mode 100644 index 0000000..99d995a --- /dev/null +++ b/test/fixture/skip-only.js @@ -0,0 +1,5 @@ +import test from '../../'; + +test.skip(t => { + t.fail(); +});