Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Commit 303c3e4

Browse files
author
exoego
committed
Node.js v8 seems not to throw exception on closed writable
1 parent 53db3e2 commit 303c3e4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/nodejs-v8/src/test/scala/nodejs/ConsoleTest.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ class ConsoleTest extends FunSpec with BeforeAndAfterEach {
1414
if (Fs.existsSync(logFileName)) Fs.unlinkSync(logFileName)
1515
}
1616

17+
private val failingWritable = Fs.createWriteStream(logFileName)
18+
failingWritable.close(_ => {})
19+
1720
it("have constructor(stdout, stderr, ignoreErrors) added in v8.0.0") {
18-
val failingWritable = Fs.createWriteStream(logFileName)
19-
failingWritable.close(_ => {})
2021
val looseConsole = new Console(
2122
stdout = failingWritable,
2223
stderr = failingWritable,
@@ -25,7 +26,7 @@ class ConsoleTest extends FunSpec with BeforeAndAfterEach {
2526
looseConsole.log("ok")
2627
}
2728

28-
it("should suppor ignoreErrors") {
29+
it("should support ignoreErrors") {
2930
assume(TestEnvironment.isExecutedInNode10OrNewer)
3031
val strictConsole = new Console(
3132
stdout = failingWritable,

0 commit comments

Comments
 (0)