Browse Source

test for #669

rewrite
Rich Harris 9 years ago
parent
commit
7e67b8b273
  1. 3
      test/form/unused-var/_config.js
  2. 7
      test/form/unused-var/_expected/amd.js
  3. 5
      test/form/unused-var/_expected/cjs.js
  4. 3
      test/form/unused-var/_expected/es.js
  5. 8
      test/form/unused-var/_expected/iife.js
  6. 11
      test/form/unused-var/_expected/umd.js
  7. 6
      test/form/unused-var/foo.js
  8. 2
      test/form/unused-var/main.js

3
test/form/unused-var/_config.js

@ -0,0 +1,3 @@
module.exports = {
description: 'omits unused var declaration'
};

7
test/form/unused-var/_expected/amd.js

@ -0,0 +1,7 @@
define(function () { 'use strict';
var foo = 'lol';
console.log( foo );
});

5
test/form/unused-var/_expected/cjs.js

@ -0,0 +1,5 @@
'use strict';
var foo = 'lol';
console.log( foo );

3
test/form/unused-var/_expected/es.js

@ -0,0 +1,3 @@
var foo = 'lol';
console.log( foo );

8
test/form/unused-var/_expected/iife.js

@ -0,0 +1,8 @@
(function () {
'use strict';
var foo = 'lol';
console.log( foo );
}());

11
test/form/unused-var/_expected/umd.js

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

6
test/form/unused-var/foo.js

@ -0,0 +1,6 @@
var foo = 'lol';
var bar = 'wut';
var baz = bar || foo;
export { foo };

2
test/form/unused-var/main.js

@ -0,0 +1,2 @@
import { foo } from './foo.js';
console.log( foo );
Loading…
Cancel
Save