Add fixtures for exports with desctucturing.

This commit is contained in:
Artem Yavorsky
2017-06-26 15:44:18 +03:00
parent ddba7ba89f
commit 2cfd01aeb6
14 changed files with 44 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
"use strict";
const [foo, bar = 2] = [];
exports.foo = foo;
exports.bar = bar;

View File

@@ -0,0 +1 @@
export const [foo, bar, ...baz] = [];

View File

@@ -0,0 +1,6 @@
"use strict";
const [foo, bar, ...baz] = [];
exports.foo = foo;
exports.bar = bar;
exports.baz = baz;

View File

@@ -0,0 +1 @@
export const [foo, bar] = [];

View File

@@ -0,0 +1,5 @@
"use strict";
const [foo, bar] = [];
exports.foo = foo;
exports.bar = bar;

View File

@@ -0,0 +1,5 @@
"use strict";
const { foo, bar = 1 } = {};
exports.foo = foo;
exports.bar = bar;

View File

@@ -0,0 +1 @@
export const { foo, ...bar } = {};

View File

@@ -0,0 +1,5 @@
"use strict";
const { foo, ...bar } = {};
exports.foo = foo;
exports.bar = bar;

View File

@@ -0,0 +1 @@
export const { foo: bar, baz } = {};

View File

@@ -0,0 +1,5 @@
"use strict";
const { foo: bar, baz } = {};
exports.bar = bar;
exports.baz = baz;

View File

@@ -1,3 +1,7 @@
{
"plugins": ["external-helpers", ["transform-es2015-modules-commonjs", { "strict": true }]]
"plugins": [
"external-helpers",
"syntax-object-rest-spread",
["transform-es2015-modules-commonjs", { "strict": true }]
]
}