diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2018-06-11 22:51:11 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2018-06-11 22:51:11 +0200 |
commit | 356fd18c7385f99766fe1e8d843ec85712bbaf76 (patch) | |
tree | b7b7d58d45f0f5c52e63a9b933fa174f78aaf639 /deno2/js | |
parent | f89f576f6da6738617ac30f57b3c832a293434f5 (diff) |
Calling denoSub twice should fail.
Diffstat (limited to 'deno2/js')
-rw-r--r-- | deno2/js/mock_runtime.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/deno2/js/mock_runtime.js b/deno2/js/mock_runtime.js index 5702ed592..570d6cf28 100644 --- a/deno2/js/mock_runtime.js +++ b/deno2/js/mock_runtime.js @@ -49,3 +49,10 @@ function SubReturnBar() { const rstr = String.fromCharCode(...rui8); assert(rstr === "bar"); } + +function DoubleSubFails() { + // denoSub is an internal function and should only be called once from the + // runtime. + denoSub((channel, msg) => assert(false)); + denoSub((channel, msg) => assert(false)); +} |