summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/tests/unit/broadcast_channel_test.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/cli/tests/unit/broadcast_channel_test.ts b/cli/tests/unit/broadcast_channel_test.ts
index 06821c4db..b13a47574 100644
--- a/cli/tests/unit/broadcast_channel_test.ts
+++ b/cli/tests/unit/broadcast_channel_test.ts
@@ -2,7 +2,7 @@
import { assertEquals } from "../../../test_util/std/testing/asserts.ts";
import { deferred } from "../../../test_util/std/async/deferred.ts";
-Deno.test("broadcastchannel worker", async () => {
+Deno.test("BroadcastChannel worker", async () => {
const intercom = new BroadcastChannel("intercom");
let count = 0;
@@ -27,3 +27,9 @@ Deno.test("broadcastchannel worker", async () => {
await promise;
});
+
+Deno.test("BroadcastChannel immediate close after post", () => {
+ const bc = new BroadcastChannel("internal_notification");
+ bc.postMessage("New listening connected!");
+ bc.close();
+});