From 729d445b6885f69dd2c6355f38707bd42851c791 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Wed, 22 Jun 2022 23:21:48 -0700 Subject: change the directory structure --- .../bunjs-only-snippets/web-globals.test.js | 46 ---------------------- 1 file changed, 46 deletions(-) delete mode 100644 integration/bunjs-only-snippets/web-globals.test.js (limited to 'integration/bunjs-only-snippets/web-globals.test.js') diff --git a/integration/bunjs-only-snippets/web-globals.test.js b/integration/bunjs-only-snippets/web-globals.test.js deleted file mode 100644 index ac7c22e84..000000000 --- a/integration/bunjs-only-snippets/web-globals.test.js +++ /dev/null @@ -1,46 +0,0 @@ -import { expect, test } from "bun:test"; - -test("exists", () => { - expect(typeof URL !== "undefined").toBe(true); - expect(typeof URLSearchParams !== "undefined").toBe(true); - expect(typeof DOMException !== "undefined").toBe(true); - expect(typeof Event !== "undefined").toBe(true); - expect(typeof EventTarget !== "undefined").toBe(true); - expect(typeof AbortController !== "undefined").toBe(true); - expect(typeof AbortSignal !== "undefined").toBe(true); - expect(typeof CustomEvent !== "undefined").toBe(true); - expect(typeof Headers !== "undefined").toBe(true); - expect(typeof ErrorEvent !== "undefined").toBe(true); - expect(typeof CloseEvent !== "undefined").toBe(true); - expect(typeof MessageEvent !== "undefined").toBe(true); - expect(typeof TextEncoder !== "undefined").toBe(true); - expect(typeof WebSocket !== "undefined").toBe(true); -}); - -test("CloseEvent", () => { - var event = new CloseEvent("close", { reason: "world" }); - expect(event.type).toBe("close"); - const target = new EventTarget(); - var called = false; - target.addEventListener("close", ({ type, reason }) => { - expect(type).toBe("close"); - expect(reason).toBe("world"); - called = true; - }); - target.dispatchEvent(event); - expect(called).toBe(true); -}); - -test("MessageEvent", () => { - var event = new MessageEvent("message", { data: "world" }); - expect(event.type).toBe("message"); - const target = new EventTarget(); - var called = false; - target.addEventListener("message", ({ type, data }) => { - expect(type).toBe("message"); - expect(data).toBe("world"); - called = true; - }); - target.dispatchEvent(event); - expect(called).toBe(true); -}); -- cgit v1.2.3