mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
10 years ago
9 changed files with 88 additions and 0 deletions
@ -0,0 +1,4 @@ |
|||
module.exports = { |
|||
description: 'does not name unused-but-included default export', |
|||
// solo: true
|
|||
}; |
@ -0,0 +1,14 @@ |
|||
define(function () { 'use strict'; |
|||
|
|||
var foo = { value: 1 }; |
|||
|
|||
function mutate ( obj ) { |
|||
obj.value += 1; |
|||
return obj; |
|||
} |
|||
|
|||
mutate( foo ); |
|||
|
|||
assert.equal( foo.value, 2 ); |
|||
|
|||
}); |
@ -0,0 +1,12 @@ |
|||
'use strict'; |
|||
|
|||
var foo = { value: 1 }; |
|||
|
|||
function mutate ( obj ) { |
|||
obj.value += 1; |
|||
return obj; |
|||
} |
|||
|
|||
mutate( foo ); |
|||
|
|||
assert.equal( foo.value, 2 ); |
@ -0,0 +1,10 @@ |
|||
var foo = { value: 1 }; |
|||
|
|||
function mutate ( obj ) { |
|||
obj.value += 1; |
|||
return obj; |
|||
} |
|||
|
|||
mutate( foo ); |
|||
|
|||
assert.equal( foo.value, 2 ); |
@ -0,0 +1,14 @@ |
|||
(function () { 'use strict'; |
|||
|
|||
var foo = { value: 1 }; |
|||
|
|||
function mutate ( obj ) { |
|||
obj.value += 1; |
|||
return obj; |
|||
} |
|||
|
|||
mutate( foo ); |
|||
|
|||
assert.equal( foo.value, 2 ); |
|||
|
|||
})(); |
@ -0,0 +1,18 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : |
|||
typeof define === 'function' && define.amd ? define(factory) : |
|||
factory(); |
|||
}(this, function () { 'use strict'; |
|||
|
|||
var foo = { value: 1 }; |
|||
|
|||
function mutate ( obj ) { |
|||
obj.value += 1; |
|||
return obj; |
|||
} |
|||
|
|||
mutate( foo ); |
|||
|
|||
assert.equal( foo.value, 2 ); |
|||
|
|||
})); |
@ -0,0 +1,8 @@ |
|||
export var foo = { value: 1 }; |
|||
|
|||
function mutate ( obj ) { |
|||
obj.value += 1; |
|||
return obj; |
|||
} |
|||
|
|||
export default mutate( foo ); |
@ -0,0 +1,2 @@ |
|||
import { foo } from './foo'; |
|||
assert.equal( foo.value, 2 ); |
Loading…
Reference in new issue