Skip to content

Commit eb2a0db

Browse files
cjihrigMylesBorins
authored andcommitted
test: update windows module load error message
libuv 1.14.0 includes a fix for the "%1 is not a valid Win32 application" error message. Refs: #14866 PR-URL: #14950 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent efc3530 commit eb2a0db

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

test/parallel/test-module-loading-error.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22
const common = require('../common');
33
const assert = require('assert');
44

5-
console.error('load test-module-loading-error.js');
6-
7-
const error_desc = {
8-
win32: ['%1 is not a valid Win32 application'],
5+
const errorMessagesByPlatform = {
6+
win32: ['is not a valid Win32 application'],
97
linux: ['file too short', 'Exec format error'],
108
sunos: ['unknown file type', 'not an ELF file'],
119
darwin: ['file too short'],
1210
aix: ['Cannot load module',
1311
'Cannot run a file that does not have a valid format.']
1412
};
15-
const dlerror_msg = error_desc[process.platform];
13+
const dlerror_msg = errorMessagesByPlatform[process.platform];
1614

1715
if (!dlerror_msg)
1816
common.skip('platform not supported.');

0 commit comments

Comments
 (0)