Skip to content

Commit e23647e

Browse files
author
vdemedes
committed
Merge branch 'kasperisager-count-skipped-tests'
2 parents 5d36a80 + 3739d4b commit e23647e

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function exit() {
6868
}
6969

7070
globals.setImmediate(function () {
71-
var numberOfTests = runner.select({type: 'test', skipped: false}).length;
71+
var numberOfTests = runner.select({type: 'test'}).length;
7272

7373
if (numberOfTests === 0) {
7474
send('no-tests', {avaRequired: true});

test/api.js

+12
Original file line numberDiff line numberDiff line change
@@ -475,3 +475,15 @@ test('caching can be disabled', function (t) {
475475
t.end();
476476
});
477477
});
478+
479+
test('test file with only skipped tests does not create a failure', function (t) {
480+
t.plan(2);
481+
482+
var api = new Api([path.join(__dirname, 'fixture/skip-only.js')]);
483+
484+
api.run()
485+
.then(function () {
486+
t.is(api.tests.length, 1);
487+
t.true(api.tests[0].skip);
488+
});
489+
});

test/fixture/skip-only.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import test from '../../';
2+
3+
test.skip(t => {
4+
t.fail();
5+
});

0 commit comments

Comments
 (0)