Browse Source

prevent irrelevant warning in test

gh-786
Rich-Harris 8 years ago
parent
commit
d08a8050a7
  1. 9
      test/function/wraps-ambiguous-default-export/_config.js
  2. 4
      test/function/wraps-ambiguous-default-export/foo.js

9
test/function/wraps-ambiguous-default-export/_config.js

@ -1,10 +1,3 @@
const assert = require( 'assert' );
module.exports = {
description: 'wraps a function expression callee in parens to avoid it being parsed as function declaration (#1011)',
warnings: warnings => {
assert.deepEqual( warnings, [
'foo.js (1:15) Ambiguous default export (is a call expression, but looks like a function declaration). See https://github.com/rollup/rollup/wiki/Troubleshooting#ambiguous-default-export'
]);
}
description: 'wraps a function expression callee in parens to avoid it being parsed as function declaration (#1011)'
};

4
test/function/wraps-ambiguous-default-export/foo.js

@ -1,6 +1,4 @@
export default function foo ( x ) {
assert.equal( x, 42 );
global.ran = true;
}
( 42 );
}( 42 );

Loading…
Cancel
Save