aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
authorEduardo Julian2022-06-11 01:53:31 -0400
committerEduardo Julian2022-06-11 01:53:31 -0400
commit7abf2d0ac55c229a8793bbff31f132596ffcb275 (patch)
treef0b6526b0e2140b5b3add8bb1956746de5f57bb7 /stdlib/source/test
parent5b36c00da8a21c5d70adec4b50ef573e12dc5cf8 (diff)
Added extension to JS interop for writing object literals.
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/ffi.js.lux15
1 files changed, 15 insertions, 0 deletions
diff --git a/stdlib/source/test/lux/ffi.js.lux b/stdlib/source/test/lux/ffi.js.lux
index 6fe42ec08..ade4d78a8 100644
--- a/stdlib/source/test/lux/ffi.js.lux
+++ b/stdlib/source/test/lux/ffi.js.lux
@@ -146,6 +146,21 @@
(_.coverage [/.undefined /.undefined?]
(and (not (/.undefined? number))
(/.undefined? (/.undefined))))
+ (_.coverage [/.object]
+ (let [it (/.object
+ "my_boolean" boolean
+ "my_number" number
+ "my_string" string
+ "my_function" function
+ "my_object" object
+ "my_undefined" (/.undefined))]
+ (and (same? boolean ("js object get" "my_boolean" it))
+ (same? number ("js object get" "my_number" it))
+ (same? string ("js object get" "my_string" it))
+ (same? function ("js object get" "my_function" it))
+ (same? object ("js object get" "my_object" it))
+ (same? (/.undefined) ("js object get" "my_undefined" it))
+ (/.undefined? ("js object get" "my_yolo" it)))))
$/export.test
)))))