fix tests
This commit is contained in:
@@ -36,19 +36,19 @@ avoid_spread_in_ternary: {
|
|||||||
function print(...x) {
|
function print(...x) {
|
||||||
console.log(...x);
|
console.log(...x);
|
||||||
}
|
}
|
||||||
var a = [1, 2], b = [3, 4];
|
var a = [1, 2], b = [3, 4], m = Math;
|
||||||
|
|
||||||
if (Math)
|
if (m)
|
||||||
print(a);
|
print(a);
|
||||||
else
|
else
|
||||||
print(b);
|
print(b);
|
||||||
|
|
||||||
if (Math)
|
if (m)
|
||||||
print(...a);
|
print(...a);
|
||||||
else
|
else
|
||||||
print(b);
|
print(b);
|
||||||
|
|
||||||
if (Math.no_such_property)
|
if (m.no_such_property)
|
||||||
print(a);
|
print(a);
|
||||||
else
|
else
|
||||||
print(...b);
|
print(...b);
|
||||||
@@ -57,10 +57,10 @@ avoid_spread_in_ternary: {
|
|||||||
function print(...x) {
|
function print(...x) {
|
||||||
console.log(...x);
|
console.log(...x);
|
||||||
}
|
}
|
||||||
var a = [ 1, 2 ], b = [ 3, 4 ];
|
var a = [ 1, 2 ], b = [ 3, 4 ], m = Math;
|
||||||
print(Math ? a : b);
|
print(m ? a : b);
|
||||||
Math ? print(...a) : print(b);
|
m ? print(...a) : print(b);
|
||||||
Math.no_such_property ? print(a) : print(...b);
|
m.no_such_property ? print(a) : print(...b);
|
||||||
}
|
}
|
||||||
expect_stdout: [
|
expect_stdout: [
|
||||||
"[ 1, 2 ]",
|
"[ 1, 2 ]",
|
||||||
|
|||||||
@@ -5130,8 +5130,10 @@ issue_2560_6: {
|
|||||||
}
|
}
|
||||||
expect: {
|
expect: {
|
||||||
function baz() {
|
function baz() {
|
||||||
|
// TODO: improve to match `master`
|
||||||
|
function foo() {}
|
||||||
try {
|
try {
|
||||||
throw function() {};
|
throw foo;
|
||||||
} catch (bar) {
|
} catch (bar) {
|
||||||
return bar;
|
return bar;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user