mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
8 years ago
4 changed files with 7 additions and 4 deletions
@ -1,8 +1,9 @@ |
|||
const path = require( 'path' ); |
|||
const assert = require( 'assert' ); |
|||
|
|||
module.exports = { |
|||
description: 'throws on double default exports', |
|||
error: err => { |
|||
assert.equal( err.message, 'A module can only have one default export' ); |
|||
assert.equal( err.message, `Duplicate export 'default' (2:7) in ${path.resolve(__dirname, 'foo.js')}` ); |
|||
} |
|||
}; |
|||
|
@ -1,8 +1,9 @@ |
|||
const path = require( 'path' ); |
|||
const assert = require( 'assert' ); |
|||
|
|||
module.exports = { |
|||
description: 'throws on duplicate named exports', |
|||
error: err => { |
|||
assert.equal( err.message, `A module cannot have multiple exports with the same name ('foo')` ); |
|||
assert.equal( err.message, `Duplicate export 'foo' (3:9) in ${path.resolve(__dirname, 'foo.js')}` ); |
|||
} |
|||
}; |
|||
|
@ -1,8 +1,9 @@ |
|||
const path = require( 'path' ); |
|||
const assert = require( 'assert' ); |
|||
|
|||
module.exports = { |
|||
description: 'throws on duplicate named exports', |
|||
error: err => { |
|||
assert.equal( err.message, `A module cannot have multiple exports with the same name ('foo')` ); |
|||
assert.equal( err.message, `Duplicate export 'foo' (3:9) in ${path.resolve(__dirname, 'foo.js')}` ); |
|||
} |
|||
}; |
|||
|
Loading…
Reference in new issue