Skip to content
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

Node v12 and preserve-symlinks/-main flags #3900

Merged
merged 1 commit into from
May 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions test/node-unit/cli/node-flags.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,12 @@ describe('node-flags', function() {
it('should return true for flags starting with "preserve-symlinks"', function() {
expect(isNodeFlag('preserve-symlinks'), 'to be true');
expect(isNodeFlag('preserve-symlinks-main'), 'to be true');
// XXX this is not true in some newer versions of Node.js. figure out where
// this changed.
expect(isNodeFlag('preserve_symlinks'), 'to be false');
// Node >= v12 both flags exist in process.allowedNodeEnvironmentFlags
const nodeVersion = parseInt(process.version.match(/^v(\d+)\./)[1], 10);
expect(
isNodeFlag('preserve_symlinks'),
nodeVersion >= 12 ? 'to be true' : 'to be false'
);
});

it('should return true for flags starting with "harmony-" or "harmony_"', function() {
Expand Down