about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/javascript.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/javascript.scm b/tests/javascript.scm
index 9f86e7f..4a58f3a 100644
--- a/tests/javascript.scm
+++ b/tests/javascript.scm
@@ -178,4 +178,12 @@
   (evaluate-javascript-expression "$(1 - (2 - 1))"
                                   '()))
 
+(test-equal "evaluate javascript function body"
+  2
+  (evaluate-javascript-expression "${switch (inputs.message) { case \"foo\": return 1; case \"bar\": return 2; default: return 3}}"
+                                  '(("inputs" . (("message" . "bar")
+                                                 ("threads" . 48)))
+                                    ("self" . #f)
+                                    ("runtime" . #f))))
+
 (test-end "javascript")