diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/specs/future/runtime_api/main.js | 12 | ||||
-rw-r--r-- | tests/specs/future/runtime_api/main.out | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/specs/future/runtime_api/main.js b/tests/specs/future/runtime_api/main.js index ed60a7b7c..9d3b3ed6c 100644 --- a/tests/specs/future/runtime_api/main.js +++ b/tests/specs/future/runtime_api/main.js @@ -31,4 +31,16 @@ console.log("Deno.writeAllSync is", Deno.writeAllSync); console.log("Deno.write is", Deno.write); console.log("Deno.writeSync is", Deno.writeSync); +try { + new Deno.FsFile(0); +} catch (error) { + if ( + error instanceof TypeError && + error.message === + "`Deno.FsFile` cannot be constructed, use `Deno.open()` or `Deno.openSync()` instead." + ) { + console.log("Deno.FsFile constructor is illegal"); + } +} + self.close(); diff --git a/tests/specs/future/runtime_api/main.out b/tests/specs/future/runtime_api/main.out index c8ef8c62a..595ffd4a4 100644 --- a/tests/specs/future/runtime_api/main.out +++ b/tests/specs/future/runtime_api/main.out @@ -27,3 +27,4 @@ Deno.writeAll is undefined Deno.writeAllSync is undefined Deno.write is undefined Deno.writeSync is undefined +Deno.FsFile constructor is illegal |