use *, add test for assign-expression in parameter (#4865)

This commit is contained in:
Henry Zhu
2016-11-19 10:45:00 -05:00
committed by GitHub
parent cd041541b8
commit 19bb830c50
3 changed files with 14 additions and 20 deletions

View File

@@ -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",
});

View File

@@ -1,2 +1,4 @@
({ a } = c);
({ a, ...b } = c);
({ a1 } = c1);
({ a2, ...b2 } = c2);
console.log({ a3, ...b3 } = c3);

View File

@@ -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));