Skip to content

Commit

Permalink
set up fast-check in fuzzy test to execute 3000 test rounds instead o…
Browse files Browse the repository at this point in the history
…f (default fast-check) 100 rounds in order to increase the probability of catching edge cases consistently.
  • Loading branch information
GerHobbelt committed Apr 16, 2019
1 parent c001d1b commit 587b02c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions test/25-dumper-fuzzy.js
Expand Up @@ -39,11 +39,21 @@ suite('Properties', function () {
yamlArbitrary,
dumpOptionsArbitrary,
function (obj, dumpOptions) {
// console.warn('in:', JSON.stringify(obj));
var yamlContent = yaml.safeDump(obj, dumpOptions);
assert.strictEqual(typeof yamlContent, 'string');
assert.deepStrictEqual(yaml.safeLoad(yamlContent), obj, 'mismatch for input `' + yamlContent + '`');
// console.warn('str:', yamlContent);
var roundTrip = yaml.safeLoad(yamlContent);
// console.warn('out:', JSON.stringify(roundTrip));
assert.deepStrictEqual(roundTrip, obj, 'mismatch for input: ' + JSON.stringify(obj, null, 2));
}),
{ verbose: true });
{
verbose: true,
numRuns: 3000,

This comment has been minimized.

Copy link
@puzrin

puzrin Apr 16, 2019

This can be a problem for other devs, because long tests are annoying. If you need to increase tests count temporary, i'd suggest to do it via optional ENV variable.

// seed: 1955227325,
// path: '68:2:2:2:1:3:2:2:4:3:3:3:3:3:3:4:4:3:3:3:3:4:5:3:10:10:9:8:8:8:8:8:8:8:9:9:9:9:9:9:9:9',
// endOnFailure: true
});
});
});

Expand Down

0 comments on commit 587b02c

Please sign in to comment.