We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent efc3530 commit eb2a0dbCopy full SHA for eb2a0db
test/parallel/test-module-loading-error.js
@@ -2,17 +2,15 @@
2
const common = require('../common');
3
const assert = require('assert');
4
5
-console.error('load test-module-loading-error.js');
6
-
7
-const error_desc = {
8
- win32: ['%1 is not a valid Win32 application'],
+const errorMessagesByPlatform = {
+ win32: ['is not a valid Win32 application'],
9
linux: ['file too short', 'Exec format error'],
10
sunos: ['unknown file type', 'not an ELF file'],
11
darwin: ['file too short'],
12
aix: ['Cannot load module',
13
'Cannot run a file that does not have a valid format.']
14
};
15
-const dlerror_msg = error_desc[process.platform];
+const dlerror_msg = errorMessagesByPlatform[process.platform];
16
17
if (!dlerror_msg)
18
common.skip('platform not supported.');
0 commit comments