mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
9 years ago
7 changed files with 29 additions and 18 deletions
@ -0,0 +1,5 @@ |
|||
module.exports = { |
|||
description: 'renames function expression IDs correctly', |
|||
show: true, |
|||
solo: true |
|||
}; |
@ -0,0 +1,5 @@ |
|||
function x () { |
|||
console.log( 'after' ); |
|||
} |
|||
|
|||
export { x as after }; |
@ -0,0 +1,5 @@ |
|||
function x () { |
|||
console.log( 'before' ); |
|||
} |
|||
|
|||
export { x as before }; |
@ -0,0 +1,7 @@ |
|||
var x = (function () { |
|||
return function x ( num ) { |
|||
return num <= 2 ? num : num * x( num - 1 ); |
|||
}; |
|||
})(); |
|||
|
|||
export { x }; |
@ -0,0 +1,7 @@ |
|||
import { before } from './before'; |
|||
import { x } from './factorial'; |
|||
import { after } from './after'; |
|||
|
|||
before(); |
|||
assert.equal( x( 5 ), 120 ); |
|||
after(); |
@ -1,9 +0,0 @@ |
|||
var assert = require( 'assert' ); |
|||
|
|||
module.exports = { |
|||
description: 'handles shadowed exported variable', |
|||
exports: function ( exports ) { |
|||
assert.equal( exports.foo(), 42 ); |
|||
}, |
|||
// solo: true
|
|||
}; |
@ -1,9 +0,0 @@ |
|||
var foo; |
|||
|
|||
foo = (function () { |
|||
return function foo () { |
|||
return 42; |
|||
}; |
|||
})(); |
|||
|
|||
export { foo }; |
Loading…
Reference in new issue