From 587b02c0d91901e00571bbe086e06d403084bb57 Mon Sep 17 00:00:00 2001 From: Ger Hobbelt Date: Tue, 16 Apr 2019 13:59:42 +0200 Subject: [PATCH] set up fast-check in fuzzy test to execute 3000 test rounds instead of (default fast-check) 100 rounds in order to increase the probability of catching edge cases consistently. --- test/25-dumper-fuzzy.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/25-dumper-fuzzy.js b/test/25-dumper-fuzzy.js index 60fa4500..2be36e7e 100644 --- a/test/25-dumper-fuzzy.js +++ b/test/25-dumper-fuzzy.js @@ -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, + // 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 + }); }); });