Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: adding test coverage for SIGWINCH in stdio.js, call original fu…
…nction from wrapper
  • Loading branch information
sarahmeyer committed Dec 1, 2016
commit 1fb5d71ecc492d3ad2185fe5caadcefed31d4653
4 changes: 4 additions & 0 deletions test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
require('../common');

// if printing, add to out file
const originalRefreshSizeWrapperStderr = process.stderr._refreshSize;
const originalRefreshSizeWrapperStdout = process.stdout._refreshSize;

const refreshSizeWrapperStderr = () => {
console.log('calling stderr._refreshSize');
originalRefreshSizeWrapperStderr.call(process.stderr);
};

const refreshSizeWrapperStdout = () => {
console.log('calling stdout._refreshSize');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment indicating that the console.log is part of the test would be helpful.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, done. Will run Ci again because there was some refactoring that accompanied it.

originalRefreshSizeWrapperStdout.call(process.stdout);
};

process.stderr._refreshSize = refreshSizeWrapperStderr;
Expand Down