mirror of https://github.com/lukechilds/rollup.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
399 B
17 lines
399 B
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' );
|
|
}
|
|
};
|
|
|