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 = { |
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 { one as oneRenamed } from './one'; |
||||
import { two } from './two'; |
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' ); |
const assert = require( 'assert' ); |
||||
|
const path = require( 'path' ); |
||||
var warned = false; |
|
||||
|
|
||||
module.exports = { |
module.exports = { |
||||
description: 'warns on export {}, but does not fail', |
description: 'warns on export {}, but does not fail', |
||||
options: { |
warnings: warnings => { |
||||
onwarn: function ( msg ) { |
assert.deepEqual( warnings, [ |
||||
warned = true; |
`Module ${path.resolve( __dirname, 'main.js' )} has an empty export declaration`, |
||||
assert.ok( /main\.js has an empty export declaration/.test( msg ) ); |
'Generated an empty bundle' |
||||
} |
]); |
||||
}, |
|
||||
exports: function ( exports ) { |
|
||||
assert.equal( Object.keys( exports ).length, 0 ); |
|
||||
assert.ok( warned, 'did not warn' ); |
|
||||
} |
} |
||||
}; |
}; |
||||
|
@ -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