diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2021-08-11 10:20:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-11 10:20:47 -0400 |
| commit | 15a763152f9d392cb80692262f8de5ef8ae15495 (patch) | |
| tree | fcd1a59777f95920bf3502519983d6cc0d882a9a /cli/tests/034_onload | |
| parent | a0285e2eb88f6254f6494b0ecd1878db3a3b2a58 (diff) | |
chore: move test files to testdata directory (#11601)
Diffstat (limited to 'cli/tests/034_onload')
| -rw-r--r-- | cli/tests/034_onload/imported.ts | 11 | ||||
| -rw-r--r-- | cli/tests/034_onload/main.ts | 26 | ||||
| -rw-r--r-- | cli/tests/034_onload/nest_imported.ts | 10 |
3 files changed, 0 insertions, 47 deletions
diff --git a/cli/tests/034_onload/imported.ts b/cli/tests/034_onload/imported.ts deleted file mode 100644 index 3c7a0aae2..000000000 --- a/cli/tests/034_onload/imported.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { assert } from "../../../test_util/std/testing/asserts.ts"; -import "./nest_imported.ts"; - -const handler = (e: Event) => { - assert(!e.cancelable); - console.log(`got ${e.type} event in event handler (imported)`); -}; - -window.addEventListener("load", handler); -window.addEventListener("unload", handler); -console.log("log from imported script"); diff --git a/cli/tests/034_onload/main.ts b/cli/tests/034_onload/main.ts deleted file mode 100644 index 7696ec122..000000000 --- a/cli/tests/034_onload/main.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { assert } from "../../../test_util/std/testing/asserts.ts"; -import "./imported.ts"; - -assert(window.hasOwnProperty("onload")); -assert(window.onload === null); - -const eventHandler = (e: Event) => { - assert(!e.cancelable); - console.log(`got ${e.type} event in event handler (main)`); -}; - -window.addEventListener("load", eventHandler); - -window.addEventListener("unload", eventHandler); - -window.onload = (e: Event) => { - assert(!e.cancelable); - console.log(`got ${e.type} event in onload function`); -}; - -window.onunload = (e: Event) => { - assert(!e.cancelable); - console.log(`got ${e.type} event in onunload function`); -}; - -console.log("log from main"); diff --git a/cli/tests/034_onload/nest_imported.ts b/cli/tests/034_onload/nest_imported.ts deleted file mode 100644 index 8ca668de9..000000000 --- a/cli/tests/034_onload/nest_imported.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { assert } from "../../../test_util/std/testing/asserts.ts"; - -const handler = (e: Event) => { - assert(!e.cancelable); - console.log(`got ${e.type} event in event handler (nest_imported)`); -}; - -window.addEventListener("load", handler); -window.addEventListener("unload", handler); -console.log("log from nest_imported script"); |
