add traceur test suite
This commit is contained in:
14
test/fixtures/traceur/Destructuring/FunctionArrayPattern.js
vendored
Normal file
14
test/fixtures/traceur/Destructuring/FunctionArrayPattern.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
function f([a, b, ...c], d) {
|
||||
return [a, b, c, d];
|
||||
}
|
||||
assertArrayEquals([1, 2, [3, 4], 5], f([1, 2, 3, 4], 5));
|
||||
|
||||
function g([, a]) {
|
||||
return a;
|
||||
}
|
||||
assert.equal(g([0, 1]), 1);
|
||||
|
||||
function h([, [, a]]) {
|
||||
return a;
|
||||
}
|
||||
assert.equal(h([0, [1, 2]]), 2);
|
||||
Reference in New Issue
Block a user