From 9b410be61c7d4e4e52cbfe5d31e7456d1ba19705 Mon Sep 17 00:00:00 2001 From: Artem Yavorsky Date: Wed, 15 Mar 2017 15:37:17 +0200 Subject: [PATCH] Add test for exports destructuring. --- .../fixtures/strict/export-const-destructuring/actual.js | 1 + .../strict/export-const-destructuring/expected.js | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 packages/babel-plugin-transform-es2015-modules-commonjs/test/fixtures/strict/export-const-destructuring/actual.js create mode 100644 packages/babel-plugin-transform-es2015-modules-commonjs/test/fixtures/strict/export-const-destructuring/expected.js diff --git a/packages/babel-plugin-transform-es2015-modules-commonjs/test/fixtures/strict/export-const-destructuring/actual.js b/packages/babel-plugin-transform-es2015-modules-commonjs/test/fixtures/strict/export-const-destructuring/actual.js new file mode 100644 index 0000000000..f571493604 --- /dev/null +++ b/packages/babel-plugin-transform-es2015-modules-commonjs/test/fixtures/strict/export-const-destructuring/actual.js @@ -0,0 +1 @@ +export const { foo: bar, baz } = {}; diff --git a/packages/babel-plugin-transform-es2015-modules-commonjs/test/fixtures/strict/export-const-destructuring/expected.js b/packages/babel-plugin-transform-es2015-modules-commonjs/test/fixtures/strict/export-const-destructuring/expected.js new file mode 100644 index 0000000000..b1bd936932 --- /dev/null +++ b/packages/babel-plugin-transform-es2015-modules-commonjs/test/fixtures/strict/export-const-destructuring/expected.js @@ -0,0 +1,8 @@ +"use strict"; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +const { foo: bar, baz } = {}; +exports.baz = baz; +exports.bar = bar;