Browse Source

Merge branch 'kasperisager-count-skipped-tests'

babel-plugin-for-integration-tests
vdemedes 9 years ago
parent
commit
e23647ecdc
  1. 2
      index.js
  2. 12
      test/api.js
  3. 5
      test/fixture/skip-only.js

2
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});

12
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);
});
});

5
test/fixture/skip-only.js

@ -0,0 +1,5 @@
import test from '../../';
test.skip(t => {
t.fail();
});
Loading…
Cancel
Save