Skip to content

Commit

Permalink
Try to reduce test to prevent ordering issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Nov 21, 2019
1 parent 2f6fb2d commit d892f0a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 26 deletions.
25 changes: 5 additions & 20 deletions test/cli/samples/warn-multiple/_config.js
Expand Up @@ -6,32 +6,17 @@ module.exports = {
stderr: stderr =>
assertStderrIncludes(
stderr,
'(!) Mixing named and default exports\n' +
"Consumers of your bundle will have to use bundle['default'] to access the default export, which may not be what you want. Use `output.exports: 'named'` to disable this warning\n" +
'(!) Missing shims for Node.js built-ins\n' +
"Creating a browser bundle that depends on 'url' and 'assert'. You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins\n" +
'(!) Missing global variable names\n' +
'Use output.globals to specify browser global variable names corresponding to external modules\n' +
"url (guessing 'url')\n" +
"assert (guessing 'assert')\n" +
'(!) Missing shims for Node.js built-ins\n' +
"Creating a browser bundle that depends on 'url', 'assert' and 'path'. You might need to include https://www.npmjs.com/package/rollup-plugin-node-builtins\n" +
'(!) Import of non-existent export\n' +
'main.js\n' +
"4: import assert from 'assert';\n" +
"5: import 'external';\n" +
"5: import path from 'path';\n" +
"6: import {doesNotExist} from './dep.js';\n" +
' ^\n' +
'7: \n' +
'8: console.log(this);\n' +
'(!) `this` has been rewritten to `undefined`\n' +
'https://rollupjs.org/guide/en/#error-this-is-undefined\n' +
'main.js\n' +
" 6: import {doesNotExist} from './dep.js';\n" +
' 7: \n' +
' 8: console.log(this);\n' +
' ^\n' +
' 9: \n' +
'10: export {url, assert as default};\n' +
'(!) Plugin at position 1: Plugin warning.\n' +
'8: export {url, assert, path};\n' +
'(!) Plugin test-plugin: Plugin warning.\n' +
"(!) Module level directives cause errors when bundled, 'use stuff' was ignored.\n" +
'main.js: (1:0)\n' +
"1: 'use stuff';\n" +
Expand Down
6 changes: 2 additions & 4 deletions test/cli/samples/warn-multiple/main.js
Expand Up @@ -2,9 +2,7 @@

import url from 'url';
import assert from 'assert';
import 'external';
import path from 'path';
import {doesNotExist} from './dep.js';

console.log(this);

export {url, assert as default};
export {url, assert, path};
5 changes: 3 additions & 2 deletions test/cli/samples/warn-multiple/rollup.config.js
@@ -1,15 +1,16 @@
module.exports = {
input: 'main.js',
external: ['url', 'assert', 'external'],
external: ['url', 'assert', 'path'],
plugins: [
{
name: 'test-plugin',
buildStart() {
this.warn('Plugin warning.');
}
}
],
output: {
name: 'bundle',
format: 'iife'
format: 'amd'
}
};

0 comments on commit d892f0a

Please sign in to comment.