mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
8 years ago
17 changed files with 41 additions and 38 deletions
@ -1,3 +1,10 @@ |
|||
const assert = require( 'assert' ); |
|||
|
|||
module.exports = { |
|||
description: 'allows a namespace to be assigned to a variable' |
|||
description: 'allows a namespace to be assigned to a variable', |
|||
warnings: warnings => { |
|||
assert.deepEqual( warnings, [ |
|||
'Generated an empty bundle' |
|||
]); |
|||
} |
|||
}; |
|||
|
@ -1,3 +1,7 @@ |
|||
import { one as oneRenamed } from './one'; |
|||
import { two } from './two'; |
|||
import { three as threeRenamed } from './three'; |
|||
import { three as threeRenamed } from './three'; |
|||
|
|||
assert.equal( oneRenamed, 1 ); |
|||
assert.equal( two, 2 ); |
|||
assert.equal( threeRenamed, 3 ); |
|||
|
@ -1,3 +0,0 @@ |
|||
module.exports = { |
|||
description: 'resolves more pathological cyclical dependencies gracefully' |
|||
}; |
@ -1,3 +0,0 @@ |
|||
import * as x from "./x.a.js"; |
|||
x.b(); |
|||
x.c(); |
@ -1,3 +0,0 @@ |
|||
import * as x from "./x.b.js"; |
|||
|
|||
export function b() {} |
@ -1,3 +0,0 @@ |
|||
import * as x from "./x.c.js"; |
|||
|
|||
export function c() {} |
@ -1 +0,0 @@ |
|||
import './a.js'; |
@ -1,2 +0,0 @@ |
|||
export * from "./b.js"; |
|||
export * from "./c.js"; |
@ -1,2 +0,0 @@ |
|||
export * from "./a.js"; |
|||
export * from "./c.js"; |
@ -1,2 +0,0 @@ |
|||
export * from "./a.js"; |
|||
export * from "./b.js"; |
@ -1,17 +1,12 @@ |
|||
var assert = require( 'assert' ); |
|||
|
|||
var warned = false; |
|||
const assert = require( 'assert' ); |
|||
const path = require( 'path' ); |
|||
|
|||
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' ); |
|||
warnings: warnings => { |
|||
assert.deepEqual( warnings, [ |
|||
`Module ${path.resolve( __dirname, 'main.js' )} has an empty export declaration`, |
|||
'Generated an empty bundle' |
|||
]); |
|||
} |
|||
}; |
|||
|
@ -1,3 +0,0 @@ |
|||
module.exports = { |
|||
description: 'handles multiple declaration blocks with multiple declarations (#105)' |
|||
}; |
@ -1,2 +0,0 @@ |
|||
var a, b; |
|||
var c, d; |
@ -0,0 +1,10 @@ |
|||
const assert = require( 'assert' ); |
|||
|
|||
module.exports = { |
|||
description: 'warns if empty bundle is generated (#444)', |
|||
warnings: warnings => { |
|||
assert.deepEqual( warnings, [ |
|||
'Generated an empty bundle' |
|||
]); |
|||
} |
|||
}; |
@ -0,0 +1,2 @@ |
|||
function noop () {} |
|||
noop(); |
Loading…
Reference in new issue