Skip to content

Commit

Permalink
test: fix failure in test-icu-data-dir.js
Browse files Browse the repository at this point in the history
This fixes a broken test on Windows caused by EOL conversion.

PR-URL: #13987
Refs: #13940
Refs: #13986
Reviewed-By: Refael Ackermann <[email protected]>
  • Loading branch information
tniessen committed Jun 29, 2017
1 parent 9330835 commit a1ecdcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-icu-data-dir.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const assert = require('assert');
const { spawnSync } = require('child_process');

const expected =
'could not initialize ICU ' +
'(check NODE_ICU_DATA or --icu-data-dir parameters)\n';
'could not initialize ICU (check NODE_ICU_DATA or ' +
'--icu-data-dir parameters)' + (common.isWindows ? '\r\n' : '\n');

This comment has been minimized.

Copy link
@TimothyGu

TimothyGu Jun 30, 2017

Member

Why not use require('os').EOL?

This comment has been minimized.

Copy link
@refack

refack Jun 30, 2017

Contributor

Also could remove at all (the test later is .includes(expected))


{
const child = spawnSync(process.execPath, ['--icu-data-dir=/', '-e', '0']);
Expand Down

0 comments on commit a1ecdcf

Please sign in to comment.