You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
599 B

'use strict';
const REPETITIONS = 2;
const assert = require('assert');
const common = require('../common');
const cp = require('child_process');
const path = require('path');
const targetScript = path.resolve(common.fixturesDir, 'guess-hash-seed.js');
const seeds = [];
for (let i = 0; i < REPETITIONS; ++i) {
const seed = cp.spawnSync(process.execPath, [targetScript],
{ encoding: 'utf8' }).stdout.trim();
seeds.push(seed);
}
console.log(`Seeds: ${seeds}`);
const hasDuplicates = (new Set(seeds)).size !== seeds.length;
assert.strictEqual(hasDuplicates, false);