mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
9 years ago
3 changed files with 38 additions and 20 deletions
@ -0,0 +1,17 @@ |
|||
var assert = require( 'assert' ); |
|||
|
|||
var warned = false; |
|||
|
|||
module.exports = { |
|||
description: 'warns on export {}, but does not fail', |
|||
options: { |
|||
onwarn: function ( msg ) { |
|||
warned = true; |
|||
assert.ok( /main\.js has an empty export declaration/.test( msg ) ); |
|||
} |
|||
}, |
|||
exports: function ( exports ) { |
|||
assert.equal( Object.keys( exports ).length, 0 ); |
|||
assert.ok( warned, 'did not warn' ); |
|||
} |
|||
}; |
@ -0,0 +1 @@ |
|||
export {}; |
Loading…
Reference in new issue