Browse Source

Merge branch 'called-but-unused-import' of github.com:mbostock/rollup into fix-977

legacy-quote-reserved-properties
Oskar Segersvärd 8 years ago
parent
commit
e8b44a7308
  1. 3
      test/form/unused-called-import/_config.js
  2. 7
      test/form/unused-called-import/_expected/amd.js
  3. 5
      test/form/unused-called-import/_expected/cjs.js
  4. 3
      test/form/unused-called-import/_expected/es.js
  5. 8
      test/form/unused-called-import/_expected/iife.js
  6. 11
      test/form/unused-called-import/_expected/umd.js
  7. 1
      test/form/unused-called-import/dead.js
  8. 5
      test/form/unused-called-import/foo.js
  9. 2
      test/form/unused-called-import/main.js
  10. 3
      test/form/unused-called-with-side-effects/_config.js
  11. 9
      test/form/unused-called-with-side-effects/_expected/amd.js
  12. 7
      test/form/unused-called-with-side-effects/_expected/cjs.js
  13. 5
      test/form/unused-called-with-side-effects/_expected/es.js
  14. 10
      test/form/unused-called-with-side-effects/_expected/iife.js
  15. 13
      test/form/unused-called-with-side-effects/_expected/umd.js
  16. 13
      test/form/unused-called-with-side-effects/main.js

3
test/form/unused-called-import/_config.js

@ -0,0 +1,3 @@
module.exports = {
description: 'does not include called-in-unused-code import'
};

7
test/form/unused-called-import/_expected/amd.js

@ -0,0 +1,7 @@
define(function () { 'use strict';
var foo = function() { return 'foo'; }
assert.equal( foo(), 'foo' );
});

5
test/form/unused-called-import/_expected/cjs.js

@ -0,0 +1,5 @@
'use strict';
var foo = function() { return 'foo'; }
assert.equal( foo(), 'foo' );

3
test/form/unused-called-import/_expected/es.js

@ -0,0 +1,3 @@
var foo = function() { return 'foo'; }
assert.equal( foo(), 'foo' );

8
test/form/unused-called-import/_expected/iife.js

@ -0,0 +1,8 @@
(function () {
'use strict';
var foo = function() { return 'foo'; }
assert.equal( foo(), 'foo' );
}());

11
test/form/unused-called-import/_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 = function() { return 'foo'; }
assert.equal( foo(), 'foo' );
})));

1
test/form/unused-called-import/dead.js

@ -0,0 +1 @@
export default function() { return 'dead'; }

5
test/form/unused-called-import/foo.js

@ -0,0 +1,5 @@
import dead from './dead';
export default function() { return 'foo'; }
export function foodead() { return 'foo' + dead(); }

2
test/form/unused-called-import/main.js

@ -0,0 +1,2 @@
import foo from './foo';
assert.equal( foo(), 'foo' );

3
test/form/unused-called-with-side-effects/_config.js

@ -0,0 +1,3 @@
module.exports = {
description: 'does not include called-in-unused-code import'
};

9
test/form/unused-called-with-side-effects/_expected/amd.js

@ -0,0 +1,9 @@
define(function () { 'use strict';
function foo() {
return 'foo'
}
assert.equal( foo(), 'foo' );
});

7
test/form/unused-called-with-side-effects/_expected/cjs.js

@ -0,0 +1,7 @@
'use strict';
function foo() {
return 'foo'
}
assert.equal( foo(), 'foo' );

5
test/form/unused-called-with-side-effects/_expected/es.js

@ -0,0 +1,5 @@
function foo() {
return 'foo'
}
assert.equal( foo(), 'foo' );

10
test/form/unused-called-with-side-effects/_expected/iife.js

@ -0,0 +1,10 @@
(function () {
'use strict';
function foo() {
return 'foo'
}
assert.equal( foo(), 'foo' );
}());

13
test/form/unused-called-with-side-effects/_expected/umd.js

@ -0,0 +1,13 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
typeof define === 'function' && define.amd ? define(factory) :
(factory());
}(this, (function () { 'use strict';
function foo() {
return 'foo'
}
assert.equal( foo(), 'foo' );
})));

13
test/form/unused-called-with-side-effects/main.js

@ -0,0 +1,13 @@
function foo() {
return 'foo'
}
function bar() {
dead();
}
function dead() {
console.log('dead');
}
assert.equal( foo(), 'foo' );
Loading…
Cancel
Save