Skip to content
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

fix(mocks): fix conflict between mocks and skip #863

Merged
merged 1 commit into from Jun 28, 2018
Merged

Conversation

nfischer
Copy link
Member

@nfischer nfischer commented 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

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 nfischer added fix test labels Jun 25, 2018
@nfischer nfischer requested a review from freitagbr Jun 25, 2018
@codecov-io
Copy link

@codecov-io codecov-io commented Jun 25, 2018

Codecov Report

Merging #863 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #863   +/-   ##
======================================
  Coverage    95.8%   95.8%           
======================================
  Files          34      34           
  Lines        1262    1262           
======================================
  Hits         1209    1209           
  Misses         53      53

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa9d443...df4dfab. Read the comment docs.

@freitagbr
Copy link
Contributor

@freitagbr freitagbr commented Jun 27, 2018

LGTM

@nfischer nfischer merged commit 1dd437e into master Jun 28, 2018
4 checks passed
@nfischer nfischer deleted the test-infra-mocks-skip branch Jun 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants