mirror of https://github.com/lukechilds/rollup.git
Rich Harris
9 years ago
2 changed files with 6 additions and 7 deletions
@ -1,15 +1,15 @@ |
|||
const path = require('path'); |
|||
const assert = require( 'assert' ); |
|||
|
|||
function normalize( file ) { |
|||
function normalize ( file ) { |
|||
return path.resolve( __dirname, file ).split( '\\' ).join( '/' ); |
|||
} |
|||
|
|||
module.exports = { |
|||
description: 'throws on duplicate export * from', |
|||
warnings(warnings) { |
|||
assert.equal( warnings[0], `A module cannot have multiple exports with the same name ('foo')` + |
|||
` from ${normalize( 'foo.js' )} and ${normalize( 'deep.js' )}` ); |
|||
assert.equal( warnings.length, 1 ); |
|||
warnings ( warnings ) { |
|||
assert.deepEqual( warnings, [ |
|||
`Conflicting namespaces: ${normalize('main.js')} re-exports 'foo' from both ${normalize('foo.js')} (will be ignored) and ${normalize('deep.js')}.` |
|||
]); |
|||
} |
|||
}; |
|||
|
Loading…
Reference in new issue