You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/es6/destructuring_obj.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -142,7 +142,7 @@ var tests = [
142
142
assert.doesNotThrow(function(){eval("let a; ({a:((((a1))))} = {a:20})");},"Object expression pattern with parens is valid syntax");
143
143
assert.doesNotThrow(function(){eval("let a, r1; ({a:a1 = r1} = {})");},"Object expression pattern with defaults as reference is valid syntax");
144
144
assert.doesNotThrow(function(){eval("let a, r1; ({a:a1 = r1 = 44} = {})");},"Object expression pattern with chained assignments as defaults is valid syntax");
145
-
assert.throws(function(){eval("let a, r1; ({a:(a1 = r1) = 44} = {})");},SyntaxError,"Object expression pattern with chained assignments but paren in between is not valid syntax","Expected ')'");
145
+
assert.throws(function(){eval("let a, r1; ({a:(a1 = r1) = 44} = {})");},ReferenceError,"Object expression pattern with chained assignments but paren in between is not valid syntax","Invalid left-hand side in assignment");
146
146
assert.doesNotThrow(function(){eval("var a; `${({a} = {})}`");},"Object expression pattern inside a string template is valid syntax");
147
147
assert.throws(function(){eval("for (let {x} = {} of []) {}");},SyntaxError,"for.of has declaration pattern with initializer is not valid syntax","for-of loop head declarations cannot have an initializer");
148
148
assert.throws(function(){eval("for (let {x} = {} in []) {}");},SyntaxError,"for.in has declaration pattern with initializer is not valid syntax","for-in loop head declarations cannot have an initializer");
0 commit comments