summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2019-03-27 16:10:31 -0400
committerGitHub <noreply@github.com>2019-03-27 16:10:31 -0400
commitd0b6152f11800b0baac1ae68d2eef7bfcea13cb5 (patch)
tree50ff2c12e4f27883db152edfd75fb5e8c6f3d700 /tests
parent8c770c5a90d4c0c48256f17371a5de6604270031 (diff)
Fix error when JS is executed with --recompile (#2007)
test case from @afinch7
Diffstat (limited to 'tests')
-rw-r--r--tests/025_reload_js_type_error.js5
-rw-r--r--tests/025_reload_js_type_error.js.out1
-rw-r--r--tests/025_reload_js_type_error.test2
3 files changed, 8 insertions, 0 deletions
diff --git a/tests/025_reload_js_type_error.js b/tests/025_reload_js_type_error.js
new file mode 100644
index 000000000..e19275daa
--- /dev/null
+++ b/tests/025_reload_js_type_error.js
@@ -0,0 +1,5 @@
+// There was a bug where if this was executed with --recompile it would throw a
+// type error.
+window.test = null;
+test = console;
+test.log("hello");
diff --git a/tests/025_reload_js_type_error.js.out b/tests/025_reload_js_type_error.js.out
new file mode 100644
index 000000000..ce0136250
--- /dev/null
+++ b/tests/025_reload_js_type_error.js.out
@@ -0,0 +1 @@
+hello
diff --git a/tests/025_reload_js_type_error.test b/tests/025_reload_js_type_error.test
new file mode 100644
index 000000000..dba89cea8
--- /dev/null
+++ b/tests/025_reload_js_type_error.test
@@ -0,0 +1,2 @@
+args: tests/025_reload_js_type_error.js --reload --recompile
+output: tests/025_reload_js_type_error.js.out