Permalink
Browse files

test: unref stdin after tests

Apparently when stdin is a pipe, it's not unreffing?

Probably a bug in node.
  • Loading branch information...
1 parent 6dad823 commit 191baaeddc674cc6f411654936a77134090f923f @isaacs isaacs committed Jul 15, 2013
Showing with 6 additions and 0 deletions.
  1. +2 −0 test/basic.js
  2. +2 −0 test/defaults.js
  3. +2 −0 test/many.js
View
@@ -52,6 +52,8 @@ function child () {
pass: pass,
verify: pass2,
passMatch: (pass === pass2)}))
+ if (process.stdin.unref)
+ process.stdin.unref()
})
})
})
View
@@ -52,6 +52,8 @@ function child () {
pass: pass,
verify: pass2,
passMatch: (pass === pass2)}))
+ if (process.stdin.unref)
+ process.stdin.unref()
})
})
})
View
@@ -32,6 +32,8 @@ function child () {
read({prompt:'18'}, function (er, r18) {if (er) throw er
console.log(r1, r2, r3, r4, r5, r6, r7, r8, r9, r10,
r11, r12, r13, r14, r15, r16, r17, r18)
+ if (process.stdin.unref)
+ process.stdin.unref()
})})})})})})})})})})})})})})})})})})
}

0 comments on commit 191baae

Please sign in to comment.