File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,17 @@ const tests = [
2626 ` ,
2727 { expect : [ 'Origin' , 1.0 ] }
2828 ) ,
29+
30+ helper . createTest (
31+ 'Object dynamic key assignment' ,
32+ `
33+ obj = {
34+ ("dynamic_" ++ "key"): "dynamicValue"
35+ }
36+ log obj.dynamic_key
37+ ` ,
38+ { expect : [ 'dynamicValue' ] }
39+ ) ,
2940] ;
3041
3142module . exports = { tests } ;
Original file line number Diff line number Diff line change @@ -161,6 +161,21 @@ const tests = [
161161 log x.getType()
162162 ` ,
163163 { expect : [ 'number' ] }
164+ ) ,
165+
166+ helper . createTest (
167+ 'lengths of different types' ,
168+ `
169+ arr = [1,2,3]
170+ str = "hello"
171+ obj = {a:1, b:2}
172+ nullVal = null
173+ log arr.len
174+ log str.len
175+ log obj.len
176+ log nullVal.len
177+ ` ,
178+ { expect : [ 3 , 5 , 2 , 0 ] }
164179 )
165180] ;
166181
You can’t perform that action at this time.
0 commit comments