Browse Source

add failing test case

babel-plugin-for-integration-tests
Sindre Sorhus 10 years ago
parent
commit
38ce5c38c7
  1. 25
      test/test.js

25
test/test.js

@ -214,3 +214,28 @@ test('planned async assertion', function (t) {
t.end();
});
});
test('more assertions than planned should emit an assertion error', function (t) {
ava(function (a) {
a.plan(1);
a.pass();
a.pass();
}).run(function (err) {
t.true(err, err);
t.end();
});
});
test('more assertions than planned should emit an assertion error - async', function (t) {
ava(function (a) {
a.plan(1);
a.pass();
setTimeout(function () {
a.pass();
}, 100);
}).run(function (err) {
t.true(err, err);
t.end();
});
});

Loading…
Cancel
Save