Browse Source

add test to guard against #984 regression

gh-786
Rich-Harris 8 years ago
parent
commit
88195198f8
  1. 3
      test/function/preserves-default-exports-used-locally/_config.js
  2. 5
      test/function/preserves-default-exports-used-locally/foo.js
  3. 2
      test/function/preserves-default-exports-used-locally/main.js

3
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)'
};

5
test/function/preserves-default-exports-used-locally/foo.js

@ -0,0 +1,5 @@
export default function foo () {
global.foo = 1;
}
foo();

2
test/function/preserves-default-exports-used-locally/main.js

@ -0,0 +1,2 @@
import './foo';
assert.equal( global.foo, 1 );
Loading…
Cancel
Save