fix syntax error in tests (#4652)

This commit is contained in:
Alex Lam S.L
2021-02-15 06:41:07 +00:00
committed by GitHub
parent 203ca2586a
commit 76b27891c6
2 changed files with 41 additions and 25 deletions

View File

@@ -399,7 +399,7 @@ unsafe_object_accessor: {
function f() {
var a = {
get b() {},
set b() {}
set b(v) {},
};
return { a: a };
}
@@ -408,7 +408,7 @@ unsafe_object_accessor: {
function f() {
var a = {
get b() {},
set b() {}
set b(v) {},
};
return { a: a };
}

View File

@@ -2,16 +2,32 @@ keep_name_of_getter: {
options = {
unused: true,
}
input: { a = { get foo () {} } }
expect: { a = { get foo () {} } }
input: {
a = {
get foo() {},
};
}
expect: {
a = {
get foo() {},
};
}
}
keep_name_of_setter: {
options = {
unused: true,
}
input: { a = { set foo () {} } }
expect: { a = { set foo () {} } }
input: {
a = {
set foo(v) {},
};
}
expect: {
a = {
set foo(v) {},
};
}
}
setter_with_operator_keys: {
@@ -34,7 +50,7 @@ setter_with_operator_keys: {
},
get else() {
return test2;
}
},
};
}
expect: {
@@ -56,7 +72,7 @@ setter_with_operator_keys: {
},
get else() {
return test2;
}
},
};
}
}