blob: 745765254ab8c3319695dc7c6dbaaf19fbe5a45f [file]
check = require('../check.js');
const path = __dirname;
describe('bundling', () => {
it('should work', () => {
check(path, 'bundle.min.js', 'bundle-min_golden.js_');
});
it('should produce a sourcemap', () => {
// TODO(alexeagle): the right assertion is to load up the source-map library
// and assert that the sourcemap actually maps back to the sources
check(path, 'bundle.min.js.map', 'bundle-min_golden.js.map');
});
it('should produce a debug bundle', () => {
check(path, 'bundle.min_debug.js', 'bundle-min-debug_golden.js_');
});
it('should rewrite global imports', () => {
check(path, 'bundle.umd.js', 'bundle-umd_golden.js_');
});
it('should produce a CJS bundle', () => {
check(path, 'bundle.cjs.js', 'bundle-cjs_golden.js_');
});
it('should produce an es5 UMD bundle', () => {
check(path, 'bundle.es5umd.js', 'bundle-es5umd_golden.js_');
});
it('should produce an es5 minified UMD bundle', () => {
check(path, 'bundle.min.es5umd.js', 'bundle-min-es5umd_golden.js_');
});
});