-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Description
- Version: master
- Platform: Windows 10 x64
- Subsystem: test
On Windows, error messages are translated to the user's primary language as determined by the Windows MUI, so
win32: ['%1 is not a valid Win32 application'],
does not match the error message. This results in the test case failing like this:
E:\node> Release\node test\parallel\test-module-loading-error.js
assert.js:532
throw actual;
^
Error: %1 ist keine zulässige Win32-Anwendung.
\\?\E:\node\test\fixtures\module-loading-error.node
at Object.Module._extensions..node (module.js:598:18)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at assert.throws (E:\node\test\parallel\test-module-loading-error.js:35:11)
at _tryBlock (assert.js:489:5)
at _throws (assert.js:510:12)
at Function.throws (assert.js:540:3)
I didn't find a way to change the language settings for a single process / process tree. I added my localized error message to test/parallel/test-module-loading-error.js to suppress the error, but I got tired of doing that every time I cloned the repo. I switched to ignoring the error, knowing that the cause was localization, but I would prefer a clean solution (e.g. the early failure prevents the other tests in the file to be executed). Finally, I changed the primary system language to en-US to get rid of the test failure.
@nodejs/testing Any ideas on how to tackle this problem, except ignoring it or changing the system language?