1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00

stricter array splat tests.

This commit is contained in:
Jeremy Ashkenas 2011-02-18 07:15:40 -05:00
parent 86b47a528a
commit faf98dacf6

View file

@ -37,12 +37,13 @@ test "array splat expansions with assignments", ->
arrayEq [0,1,2,3,4], list
test "array splats with nested arrays", ->
a = [1]
nonce = {}
a = [nonce]
list = [1, 2, a...]
eq list[0], 1
eq list[2], 1
eq list[2], nonce
a = [[1]]
a = [[nonce]]
list = [1, 2, a...]
ok list[2] instanceof Array
arrayEq list, [1, 2, [nonce]]