diff --git a/test/function/preserves-default-exports-used-locally/_config.js b/test/function/preserves-default-exports-used-locally/_config.js new file mode 100644 index 0000000..98c090b --- /dev/null +++ b/test/function/preserves-default-exports-used-locally/_config.js @@ -0,0 +1,3 @@ +module.exports = { + description: 'preserves default exports that are only used locally (#984)' +}; diff --git a/test/function/preserves-default-exports-used-locally/foo.js b/test/function/preserves-default-exports-used-locally/foo.js new file mode 100644 index 0000000..4f1664d --- /dev/null +++ b/test/function/preserves-default-exports-used-locally/foo.js @@ -0,0 +1,5 @@ +export default function foo () { + global.foo = 1; +} + +foo(); diff --git a/test/function/preserves-default-exports-used-locally/main.js b/test/function/preserves-default-exports-used-locally/main.js new file mode 100644 index 0000000..d8df81e --- /dev/null +++ b/test/function/preserves-default-exports-used-locally/main.js @@ -0,0 +1,2 @@ +import './foo'; +assert.equal( global.foo, 1 );