Skip to content

Commit 8ef4add

Browse files
Trottevanlucas
authored andcommittedJan 31, 2017
test: require handler to be run in sigwinch test
Use `common.mustCall()` to guarantee that the wrapped `_refreshSize()` functions are invoked. PR-URL: #11068 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michal Zasso <[email protected]>
1 parent 84a9c15 commit 8ef4add

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎test/pseudo-tty/test-stderr-stdout-handle-sigwinch.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const originalRefreshSizeStderr = process.stderr._refreshSize;
55
const originalRefreshSizeStdout = process.stdout._refreshSize;
66

77
const wrap = (fn, ioStream, string) => {
8-
return () => {
8+
const wrapped = common.mustCall(() => {
99
// The console.log() call prints a string that is in the .out file. In other
1010
// words, the console.log() is part of the test, not extraneous debugging.
1111
console.log(string);
@@ -16,7 +16,8 @@ const wrap = (fn, ioStream, string) => {
1616
if (!common.isSunOS || e.code !== 'EINVAL')
1717
throw e;
1818
}
19-
};
19+
});
20+
return wrapped;
2021
};
2122

2223
process.stderr._refreshSize = wrap(originalRefreshSizeStderr,

0 commit comments

Comments
 (0)
Please sign in to comment.