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 infra: mocks and skipOnWin conflict #862
Labels
Comments
nfischer
added a commit
that referenced
this issue
Jun 25, 2018
This fixes a conflict between mocks.init() and utils.skipOnWin/skipOnUnix. mocks.init() mocks out process.stderr.write, which utils.js implicitly depends on. Instead, preserve stderr.write in a local variable to avoid polluting mocked stdio and to correctly output warning messages. Fixes #862 Test: locally apply mocks.init() inside test/which.js
nfischer
added a commit
that referenced
this issue
Jun 28, 2018
This fixes a conflict between mocks.init() and utils.skipOnWin/skipOnUnix. mocks.init() mocks out process.stderr.write, which utils.js implicitly depends on. Instead, preserve stderr.write in a local variable to avoid polluting mocked stdio and to correctly output warning messages. Fixes #862 Test: locally apply mocks.init() inside test/which.js
This was referenced Nov 29, 2019
This was referenced Mar 24, 2020
This was referenced Apr 24, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I observed this while reviewing PR #861. If a test suite uses
mocks.init()
and also usesskipOnWin
,skipOnWin
should output stderr indicating the test is skipped, but the message is actually suppressed bymocks
.We can fix this by capturing
process.stderr.write
on startup, withinutils.js
, instead of usingconsole.warn()
directly.The text was updated successfully, but these errors were encountered: