mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
5f398b3e51
Replace `common.fixturesDir` with `fixtures.path()` usage in test/pummel/test-hash-seed.js. PR-URL: https://github.com/nodejs/node/pull/16823 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
21 lines
579 B
JavaScript
21 lines
579 B
JavaScript
'use strict';
|
|
|
|
// Check that spawn child doesn't create duplicated entries
|
|
require('../common');
|
|
const REPETITIONS = 2;
|
|
const assert = require('assert');
|
|
const fixtures = require('../common/fixtures');
|
|
const { spawnSync } = require('child_process');
|
|
const targetScript = fixtures.path('guess-hash-seed.js');
|
|
const seeds = [];
|
|
|
|
for (let i = 0; i < REPETITIONS; ++i) {
|
|
const seed = spawnSync(process.execPath, [targetScript], {
|
|
encoding: 'utf8'
|
|
}).stdout.trim();
|
|
seeds.push(seed);
|
|
}
|
|
|
|
console.log(`Seeds: ${seeds}`);
|
|
assert.strictEqual(new Set(seeds).size, seeds.length);
|