-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: use the common/fixtures module to load the fixtures #16823
test: use the common/fixtures module to load the fixtures #16823
Conversation
Commit message is too long. |
test/pummel/test-hash-seed.js
Outdated
@@ -1,20 +1,21 @@ | |||
'use strict'; | |||
|
|||
// Check that spawn child don't create duplicated entries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't
--> doesn't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thank you for working on this!
test/pummel/test-hash-seed.js
Outdated
@@ -1,20 +1,21 @@ | |||
'use strict'; | |||
|
|||
// Check that spawn child doesn't create duplicated entries | |||
require('common'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not seem to work without relative paths, can you change it to require('../common')
?
test/pummel/test-hash-seed.js
Outdated
const cp = require('child_process'); | ||
const path = require('path'); | ||
const targetScript = path.resolve(common.fixturesDir, 'guess-hash-seed.js'); | ||
const fixtures = require('common/fixtures'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this to const fixtures = require('../common/fixtures')
?
test/pummel/test-hash-seed.js
Outdated
seeds.push(seed); | ||
} | ||
|
||
console.log(`Seeds: ${seeds}`); | ||
const hasDuplicates = (new Set(seeds)).size !== seeds.length; | ||
const hasDuplicates = new Set(seeds).size !== seeds.length; | ||
assert.strictEqual(hasDuplicates, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could just be changed to assert.strictEqual(new Set(seeds).size, seeds.length);
and drop the hasDuplicates
@joyeecheung - PTAL |
CI is good. I canceled AIX because it's taking hours right now and this is unlikely to trigger something AIX-specific. |
Replace `common.fixturesDir` with `fixtures.path()` usage in test/pummel/test-hash-seed.js. PR-URL: nodejs#16823 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]>
Landed in 5f398b3. Because |
Replace `common.fixturesDir` with `fixtures.path()` usage in test/pummel/test-hash-seed.js. PR-URL: #16823 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]>
Replace `common.fixturesDir` with `fixtures.path()` usage in test/pummel/test-hash-seed.js. PR-URL: #16823 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]>
Replace `common.fixturesDir` with `fixtures.path()` usage in test/pummel/test-hash-seed.js. PR-URL: #16823 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]>
Replace `common.fixturesDir` with `fixtures.path()` usage in test/pummel/test-hash-seed.js. PR-URL: #16823 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]>
Replace `common.fixturesDir` with `fixtures.path()` usage in test/pummel/test-hash-seed.js. PR-URL: #16823 Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]>
Use the common/fixtures module to load the fixtures on test-hash-seed file
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test: