Skip to content

Commit

Permalink
Update ava-check to modern ava
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Rosén committed Jan 10, 2018
1 parent 45b3c7b commit 65ef263
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions integrations/ava-check/ava-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function check(/* [options,] ...args, propertyFn */) {
var property = testcheck.property(argGens, function testcheck$property() {
// Reset assertions and plan before every run.
test.assertError = undefined;
test.assertions = [];
test.assertCount = 0;
test.planCount = null;
test.planStack = null;

Expand All @@ -45,7 +45,7 @@ function check(/* [options,] ...args, propertyFn */) {
}

// Check plan after every run.
test._checkPlanCount();
test.verifyPlan();

if (test.assertError) {
throw test.assertError;
Expand All @@ -57,11 +57,6 @@ function check(/* [options,] ...args, propertyFn */) {
// Run testcheck
var checkResult = testcheck.check(property, options);

// Check for async assertions
if (!this.sync) {
throw new TypeError('ava-check cannot check tests with async assertions.');
}

// Report results
if (checkResult.fail) {
var shrunk = checkResult.shrunk;
Expand Down Expand Up @@ -97,3 +92,4 @@ function cleanStack(error) {
error.stack = stack.slice(0, i).join('\n');
return error;
}

0 comments on commit 65ef263

Please sign in to comment.