-
Notifications
You must be signed in to change notification settings - Fork 30k
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
test: test-assert.js fails locally #18967
Comments
That is a very interesting case. It seems like the parsed output from acorn is always using |
I cannot think of any cause for this) @nodejs/platform-windows, can anybody else check the test locally or suppose any causes for this difference? |
Still fails. |
Pipeing test output fixes this, |
I also experienced this on Windows locally. |
I guess the issue is here: Lines 403 to 407 in dd03709
When the stdout is a TTY, colors are added to the error message and this confuses test runner. We could add a way to disable colors, or make the test expect them. Or, we can make the test spawn itself with piped output, so the error messages will get generated without colors. |
When test/parallel/test-assert.js is run with a TTY as stdout, color codes in assertion messages cause the test to fail. This commit disables colors when stdout is a TTY. Fixes: nodejs#18967 PR-URL: nodejs#20695 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Adds a note to test/README.md that setting autocrlf to true when checking out sources is required for the tests to run successfully. Ref: nodejs#18967
Adds a note to test/README.md that setting autocrlf to true when checking out sources is required for the tests to run successfully. PR-URL: #20752 Ref: #18967 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
When test/parallel/test-assert.js is run with a TTY as stdout, color codes in assertion messages cause the test to fail. This commit disables colors when stdout is a TTY. Fixes: #18967 PR-URL: #20695 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Adds a note to test/README.md that setting autocrlf to true when checking out sources is required for the tests to run successfully. PR-URL: #20752 Ref: #18967 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Adds a note to test/README.md that setting autocrlf to true when checking out sources is required for the tests to run successfully. PR-URL: #20752 Ref: #18967 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Testing the #18904 locally, I've got this not related error, which I can also reproduce with the last nightly:
It seems reasonable: this fragment uses
\n
on all systems, while this fragment uses\r\n
on Windows.Why does not this test fail on CI?
The text was updated successfully, but these errors were encountered: