summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/078_unload_on_exit.ts5
-rw-r--r--cli/tests/integration_tests.rs1
2 files changed, 6 insertions, 0 deletions
diff --git a/cli/tests/078_unload_on_exit.ts b/cli/tests/078_unload_on_exit.ts
index e8288ef31..43d33eb25 100644
--- a/cli/tests/078_unload_on_exit.ts
+++ b/cli/tests/078_unload_on_exit.ts
@@ -1,4 +1,9 @@
window.onunload = () => {
console.log("onunload is called");
+ // This second exit call doesn't trigger unload event,
+ // and therefore actually stops the process.
+ Deno.exit(1);
+ console.log("This doesn't show up in console");
};
+// This exit call triggers the above unload event handler.
Deno.exit(0);
diff --git a/cli/tests/integration_tests.rs b/cli/tests/integration_tests.rs
index be7bb63c5..428d1ff30 100644
--- a/cli/tests/integration_tests.rs
+++ b/cli/tests/integration_tests.rs
@@ -2665,6 +2665,7 @@ itest!(_077_fetch_empty {
itest!(_078_unload_on_exit {
args: "run 078_unload_on_exit.ts",
output: "078_unload_on_exit.ts.out",
+ exit_code: 1,
});
itest!(_079_location_authentication {