Skip to content

Commit 65ef263

Browse files
author
Dan Rosén
committed
Update ava-check to modern ava
1 parent 45b3c7b commit 65ef263

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

integrations/ava-check/ava-check.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function check(/* [options,] ...args, propertyFn */) {
3333
var property = testcheck.property(argGens, function testcheck$property() {
3434
// Reset assertions and plan before every run.
3535
test.assertError = undefined;
36-
test.assertions = [];
36+
test.assertCount = 0;
3737
test.planCount = null;
3838
test.planStack = null;
3939

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

4747
// Check plan after every run.
48-
test._checkPlanCount();
48+
test.verifyPlan();
4949

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

60-
// Check for async assertions
61-
if (!this.sync) {
62-
throw new TypeError('ava-check cannot check tests with async assertions.');
63-
}
64-
6560
// Report results
6661
if (checkResult.fail) {
6762
var shrunk = checkResult.shrunk;
@@ -97,3 +92,4 @@ function cleanStack(error) {
9792
error.stack = stack.slice(0, i).join('\n');
9893
return error;
9994
}
95+

0 commit comments

Comments
 (0)