use *, add test for assign-expression in parameter (#4865)
This commit is contained in:
@@ -165,19 +165,7 @@ suites.forEach(function (testSuite) {
|
||||
if (actualCode) {
|
||||
let actualAst = parse(actualCode, {
|
||||
filename: actual.loc,
|
||||
plugins: [
|
||||
"jsx",
|
||||
"flow",
|
||||
"doExpressions",
|
||||
"objectRestSpread",
|
||||
"decorators",
|
||||
"classProperties",
|
||||
"exportExtensions",
|
||||
"asyncGenerators",
|
||||
"functionBind",
|
||||
"functionSent",
|
||||
"dynamicImport"
|
||||
],
|
||||
plugins: ["*"],
|
||||
strictMode: false,
|
||||
sourceType: "module",
|
||||
});
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
({ a } = c);
|
||||
({ a, ...b } = c);
|
||||
({ a1 } = c1);
|
||||
({ a2, ...b2 } = c2);
|
||||
|
||||
console.log({ a3, ...b3 } = c3);
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
({ a } = c);
|
||||
var _c = c;
|
||||
({ a } = _c);
|
||||
b = babelHelpers.objectWithoutProperties(_c, ["a"]);
|
||||
_c;
|
||||
var _c2;
|
||||
|
||||
({ a1 } = c1);
|
||||
var _c = c2;
|
||||
({ a2 } = _c);
|
||||
b2 = babelHelpers.objectWithoutProperties(_c, ["a2"]);
|
||||
|
||||
|
||||
console.log((_c2 = c3, ({ a3 } = _c2), b3 = babelHelpers.objectWithoutProperties(_c2, ["a3"]), _c2));
|
||||
Reference in New Issue
Block a user