mirror of https://github.com/lukechilds/rollup.git
Bogdan Chadkin
9 years ago
7 changed files with 39 additions and 2 deletions
@ -0,0 +1,14 @@ |
|||||
|
const path = require('path'); |
||||
|
const assert = require( 'assert' ); |
||||
|
|
||||
|
function normalize( file ) { |
||||
|
return path.resolve( __dirname, file ).split( '\\' ).join( '/' ); |
||||
|
} |
||||
|
|
||||
|
module.exports = { |
||||
|
description: 'throws on duplicate export * from', |
||||
|
error: err => { |
||||
|
assert.equal( err.message, `A module cannot have multiple exports with the same name ('foo')` + |
||||
|
` from ${normalize( 'foo.js' )} and ${normalize( 'deep.js' )}` ); |
||||
|
} |
||||
|
}; |
@ -0,0 +1 @@ |
|||||
|
export * from './deep.js'; |
@ -0,0 +1 @@ |
|||||
|
export var foo = 2; |
@ -0,0 +1 @@ |
|||||
|
export var foo = 1; |
@ -0,0 +1,2 @@ |
|||||
|
export * from './foo.js'; |
||||
|
export * from './bar.js'; |
Loading…
Reference in new issue