Skip to content

Commit f18b3f7

Browse files
authored
Fix test for some Windows installations (#108)
1 parent 062aab5 commit f18b3f7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/pipe.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,14 @@ test('.pipe() + stdout iteration, destination fail', async t => {
334334
});
335335

336336
test('.pipe() with EPIPE', async t => {
337+
// Skip this test if the current OS is lacking the Unix utility `head`
338+
try {
339+
await spawn('head', ['--version']);
340+
} catch {
341+
t.pass();
342+
return;
343+
}
344+
337345
const subprocess = spawn(...nodeEval(`setInterval(() => {
338346
console.log("${testString}");
339347
}, 0);

0 commit comments

Comments
 (0)