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

Commit 7a78579

Browse files
committed
Do not open package.json to avoid erase it
1 parent 060fada commit 7a78579

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/nodejs-v10/src/test/scala/io/scalajs/nodejs/fs/FsClassesTest.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ class FsClassesTest extends AnyFunSpec {
1818

1919
describe("WriteStream") {
2020
it("supports constructor") {
21-
new WriteStream("package.json").cork()
22-
assert(new WriteStream("package.json") !== null)
23-
assert(new WriteStream(Buffer.from("package.json")) !== null)
24-
assert(new WriteStream(new URL(s"file:///${dirname}/package.json")) !== null)
21+
assert(new WriteStream("NO_SUCH_FILE").writableLength === 0)
22+
assert(new WriteStream(Buffer.from("NO_SUCH_FILE")) !== null)
23+
assert(new WriteStream(new URL(s"file:///${dirname}/NO_SUCH_FILE")) !== null)
2524
}
2625
}
2726
}

0 commit comments

Comments
 (0)