Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

nfischer
Copy link
Member

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 Bug/defect, or a fix for such a problem test labels Jun 25, 2018
@nfischer nfischer requested a review from freitagbr June 25, 2018 00:20
@codecov-io
Copy link

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

LGTM

@nfischer nfischer merged commit 1dd437e into master Jun 28, 2018
@nfischer nfischer deleted the test-infra-mocks-skip branch June 28, 2018 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug/defect, or a fix for such a problem test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test infra: mocks and skipOnWin conflict
3 participants