diff --git a/test/function/globally-called-modifying-function/_config.js b/test/function/globally-called-modifying-function/_config.js new file mode 100644 index 0000000..b109e5a --- /dev/null +++ b/test/function/globally-called-modifying-function/_config.js @@ -0,0 +1,4 @@ +module.exports = { + // solo: true, show: true, + description: 'globally called function should be included if it modifies an exported value (#112)' +}; diff --git a/test/function/globally-called-modifying-function/main.js b/test/function/globally-called-modifying-function/main.js new file mode 100644 index 0000000..071b0cc --- /dev/null +++ b/test/function/globally-called-modifying-function/main.js @@ -0,0 +1,3 @@ +import value from './module.js'; + +assert.equal( value, 'changed' ); diff --git a/test/function/globally-called-modifying-function/module.js b/test/function/globally-called-modifying-function/module.js new file mode 100644 index 0000000..5dc01c1 --- /dev/null +++ b/test/function/globally-called-modifying-function/module.js @@ -0,0 +1,9 @@ +var value = 'original'; + +function change () { + value = 'changed'; +} + +change(); + +export default value;