From 356fd18c7385f99766fe1e8d843ec85712bbaf76 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Mon, 11 Jun 2018 22:51:11 +0200 Subject: Calling denoSub twice should fail. --- deno2/js/mock_runtime.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'deno2/js/mock_runtime.js') 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)); +} -- cgit v1.2.3