From b5498c28b7e7fd039db475d278e8cae7a24fdf87 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Thu, 13 Aug 2015 15:00:51 -0400 Subject: [PATCH] add failing test --- test/function/export-default-as/_config.js | 10 ++++++++++ test/function/export-default-as/bar.js | 1 + test/function/export-default-as/baz.js | 1 + test/function/export-default-as/foo.js | 1 + test/function/export-default-as/main.js | 8 ++++++++ test/function/export-default-as/namespace.js | 1 + 6 files changed, 22 insertions(+) create mode 100644 test/function/export-default-as/_config.js create mode 100644 test/function/export-default-as/bar.js create mode 100644 test/function/export-default-as/baz.js create mode 100644 test/function/export-default-as/foo.js create mode 100644 test/function/export-default-as/main.js create mode 100644 test/function/export-default-as/namespace.js diff --git a/test/function/export-default-as/_config.js b/test/function/export-default-as/_config.js new file mode 100644 index 0000000..b470928 --- /dev/null +++ b/test/function/export-default-as/_config.js @@ -0,0 +1,10 @@ +var assert = require( 'assert' ); + +module.exports = { + description: 'exports default-as-named from sibling module', + exports: function ( exports ) { + assert.equal( exports.foo, 'FOO' ); + assert.equal( exports.namespace.baz, 'BAZ' ); + }, + //solo: true +}; diff --git a/test/function/export-default-as/bar.js b/test/function/export-default-as/bar.js new file mode 100644 index 0000000..5ede27d --- /dev/null +++ b/test/function/export-default-as/bar.js @@ -0,0 +1 @@ +export { default as baz } from './baz'; diff --git a/test/function/export-default-as/baz.js b/test/function/export-default-as/baz.js new file mode 100644 index 0000000..cf4b80d --- /dev/null +++ b/test/function/export-default-as/baz.js @@ -0,0 +1 @@ +export default 'BAZ'; diff --git a/test/function/export-default-as/foo.js b/test/function/export-default-as/foo.js new file mode 100644 index 0000000..20fc97b --- /dev/null +++ b/test/function/export-default-as/foo.js @@ -0,0 +1 @@ +export default 'FOO'; diff --git a/test/function/export-default-as/main.js b/test/function/export-default-as/main.js new file mode 100644 index 0000000..d2c2ab1 --- /dev/null +++ b/test/function/export-default-as/main.js @@ -0,0 +1,8 @@ +import { baz } from './bar'; +import * as namespace from './namespace'; + +assert.equal( baz, 'BAZ' ); +assert.equal( namespace.baz, 'BAZ' ); + +export { default as foo } from './foo'; +export { namespace }; diff --git a/test/function/export-default-as/namespace.js b/test/function/export-default-as/namespace.js new file mode 100644 index 0000000..5ede27d --- /dev/null +++ b/test/function/export-default-as/namespace.js @@ -0,0 +1 @@ +export { default as baz } from './baz';