Browse Source

add test

better-aggressive
Rich-Harris 9 years ago
parent
commit
37f79e2836
  1. 7
      test/form/side-effect-e/_config.js
  2. 7
      test/form/side-effect-e/_expected/amd.js
  3. 5
      test/form/side-effect-e/_expected/cjs.js
  4. 3
      test/form/side-effect-e/_expected/es6.js
  5. 7
      test/form/side-effect-e/_expected/iife.js
  6. 11
      test/form/side-effect-e/_expected/umd.js
  7. 8
      test/form/side-effect-e/main.js

7
test/form/side-effect-e/_config.js

@ -0,0 +1,7 @@
module.exports = {
solo: true,
description: 'disregards side-effects that are contained within a function',
options: {
moduleName: 'myBundle'
}
};

7
test/form/side-effect-e/_expected/amd.js

@ -0,0 +1,7 @@
define(function () { 'use strict';
var main = 42;
return main;
});

5
test/form/side-effect-e/_expected/cjs.js

@ -0,0 +1,5 @@
'use strict';
var main = 42;
module.exports = main;

3
test/form/side-effect-e/_expected/es6.js

@ -0,0 +1,3 @@
var main = 42;
export default main;

7
test/form/side-effect-e/_expected/iife.js

@ -0,0 +1,7 @@
var myBundle = (function () { 'use strict';
var main = 42;
return main;
})();

11
test/form/side-effect-e/_expected/umd.js

@ -0,0 +1,11 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
global.myBundle = factory();
}(this, function () { 'use strict';
var main = 42;
return main;
}));

8
test/form/side-effect-e/main.js

@ -0,0 +1,8 @@
function foo () {
var a, b, c;
b = 1;
}
foo();
export default 42;
Loading…
Cancel
Save