mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
8 years ago
4 changed files with 21 additions and 0 deletions
@ -0,0 +1,12 @@ |
|||
const path = require( 'path' ); |
|||
const assert = require( 'assert' ); |
|||
|
|||
module.exports = { |
|||
solo: true, |
|||
description: 'warns on missing (but unused) imports', |
|||
warnings: warnings => { |
|||
assert.deepEqual( warnings, [ |
|||
`Non-existent export 'b' is imported from ${path.resolve(__dirname, 'foo.js')} by ${path.resolve(__dirname, 'main.js')}` |
|||
]); |
|||
} |
|||
}; |
@ -0,0 +1 @@ |
|||
export const a = 42; |
@ -0,0 +1,3 @@ |
|||
import { a, b } from './foo.js'; |
|||
|
|||
assert.equal( a, 42 ); |
Loading…
Reference in new issue