Skip to content

Commit

Permalink
Made 300 the default for maxIterations
Browse files Browse the repository at this point in the history
  • Loading branch information
sunesimonsen committed Mar 18, 2016
1 parent 76938ce commit 19e51ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion documentation/assertions/function/to-be-valid-for-all.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ expect(function (text) {
}, 'to be valid for all', strings);
```

This will run 100 tests with random strings of length 0-200 and succeed.
This will run 300 tests with random strings of length 0-200 and succeed.

You can specify the max number of iterations that the test should run and the
number of errors it should collect before stopping.
Expand Down
2 changes: 1 addition & 1 deletion lib/unexpected-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

expect.addAssertion('<function> to be valid for all <object>', function (expect, subject, options) {
var generators = options.generators;
var maxIterations = options.maxIterations || 100;
var maxIterations = options.maxIterations || 300;
var maxErrors = options.maxErrors || 20;

function createTask() {
Expand Down
4 changes: 2 additions & 2 deletions test/unexpected-check.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe('unexpected-check', function () {
expect(items, 'not to contain', i);
}, 'to be valid for all', arrays, g.integer({ min: -20, max: 20 }));
}, 'to throw',
'Ran 100 iterations and found 14 errors\n' +
'Ran 143 iterations and found 20 errors\n' +
'counterexample:\n' +
'\n' +
' Generated input: [ -4 ], -4\n' +
Expand All @@ -114,7 +114,7 @@ describe('unexpected-check', function () {
});
}, 'to be valid for all', arrays);
}, 'to throw',
'Ran 100 iterations and found 7 errors\n' +
'Ran 282 iterations and found 20 errors\n' +
'counterexample:\n' +
'\n' +
' Generated input: [ -8, -5, 18, 3 ]\n' +
Expand Down

0 comments on commit 19e51ab

Please sign in to comment.