Browse Source

update to acorn 4

gh-953
Rich-Harris 8 years ago
parent
commit
7819d7b688
  1. 2
      package.json
  2. 3
      test/function/double-default-export/_config.js
  3. 3
      test/function/double-named-export/_config.js
  4. 3
      test/function/double-named-reexport/_config.js

2
package.json

@ -47,7 +47,7 @@
},
"homepage": "https://github.com/rollup/rollup",
"devDependencies": {
"acorn": "^3.2.0",
"acorn": "^4.0.1",
"buble": "^0.12.5",
"chalk": "^1.1.3",
"codecov.io": "^0.1.6",

3
test/function/double-default-export/_config.js

@ -1,8 +1,9 @@
const path = require( 'path' );
const assert = require( 'assert' );
module.exports = {
description: 'throws on double default exports',
error: err => {
assert.equal( err.message, 'A module can only have one default export' );
assert.equal( err.message, `Duplicate export 'default' (2:7) in ${path.resolve(__dirname, 'foo.js')}` );
}
};

3
test/function/double-named-export/_config.js

@ -1,8 +1,9 @@
const path = require( 'path' );
const assert = require( 'assert' );
module.exports = {
description: 'throws on duplicate named exports',
error: err => {
assert.equal( err.message, `A module cannot have multiple exports with the same name ('foo')` );
assert.equal( err.message, `Duplicate export 'foo' (3:9) in ${path.resolve(__dirname, 'foo.js')}` );
}
};

3
test/function/double-named-reexport/_config.js

@ -1,8 +1,9 @@
const path = require( 'path' );
const assert = require( 'assert' );
module.exports = {
description: 'throws on duplicate named exports',
error: err => {
assert.equal( err.message, `A module cannot have multiple exports with the same name ('foo')` );
assert.equal( err.message, `Duplicate export 'foo' (3:9) in ${path.resolve(__dirname, 'foo.js')}` );
}
};

Loading…
Cancel
Save