From 4880efe31bdf05817a3d25449e7f0ce4d900d18b Mon Sep 17 00:00:00 2001 From: Arpad Borsos Date: Mon, 3 Aug 2015 11:29:17 +0200 Subject: [PATCH] add a failing test for re-exporting and renaming multiple 'default' exports --- test/function/export-from-default-renamed/_config.js | 3 +++ test/function/export-from-default-renamed/a.js | 1 + test/function/export-from-default-renamed/b.js | 1 + test/function/export-from-default-renamed/foo.js | 2 ++ test/function/export-from-default-renamed/main.js | 3 +++ 5 files changed, 10 insertions(+) create mode 100644 test/function/export-from-default-renamed/_config.js create mode 100644 test/function/export-from-default-renamed/a.js create mode 100644 test/function/export-from-default-renamed/b.js create mode 100644 test/function/export-from-default-renamed/foo.js create mode 100644 test/function/export-from-default-renamed/main.js diff --git a/test/function/export-from-default-renamed/_config.js b/test/function/export-from-default-renamed/_config.js new file mode 100644 index 0000000..2c9c52a --- /dev/null +++ b/test/function/export-from-default-renamed/_config.js @@ -0,0 +1,3 @@ +module.exports = { + description: 'export from works with multiple renamed default exports' +}; diff --git a/test/function/export-from-default-renamed/a.js b/test/function/export-from-default-renamed/a.js new file mode 100644 index 0000000..0ed5c30 --- /dev/null +++ b/test/function/export-from-default-renamed/a.js @@ -0,0 +1 @@ +export default 'a'; diff --git a/test/function/export-from-default-renamed/b.js b/test/function/export-from-default-renamed/b.js new file mode 100644 index 0000000..a68ac28 --- /dev/null +++ b/test/function/export-from-default-renamed/b.js @@ -0,0 +1 @@ +export default 'b'; diff --git a/test/function/export-from-default-renamed/foo.js b/test/function/export-from-default-renamed/foo.js new file mode 100644 index 0000000..c69fcf2 --- /dev/null +++ b/test/function/export-from-default-renamed/foo.js @@ -0,0 +1,2 @@ +export { default as a } from './a'; +export { default as b } from './b'; diff --git a/test/function/export-from-default-renamed/main.js b/test/function/export-from-default-renamed/main.js new file mode 100644 index 0000000..3a9fb68 --- /dev/null +++ b/test/function/export-from-default-renamed/main.js @@ -0,0 +1,3 @@ +import { a, b } from './foo'; +assert.equal( a, 'a' ); +assert.equal( b, 'b' );