Browse Source

failing tests for #16

contingency-plan
Rich Harris 9 years ago
parent
commit
e4fd1ef172
  1. 12
      test/function/export-from-with-definition-conflict/_config.js
  2. 3
      test/function/export-from-with-definition-conflict/a.js
  3. 9
      test/function/export-from-with-definition-conflict/main.js
  4. 12
      test/function/export-from-with-import-conflict/_config.js
  5. 3
      test/function/export-from-with-import-conflict/a.js
  6. 2
      test/function/export-from-with-import-conflict/b.js
  7. 8
      test/function/export-from-with-import-conflict/main.js

12
test/function/export-from-with-definition-conflict/_config.js

@ -0,0 +1,12 @@
var assert = require( 'assert' );
module.exports = {
description: 'ignores conflict between local definitions and export from declaration',
exports: function ( exports ) {
assert.equal( exports.foo, 'a-bar' );
assert.equal( exports.bar, 'a-foo' );
assert.equal( exports.baz, 'a-baz' );
}
};
// https://github.com/rollup/rollup/issues/16

3
test/function/export-from-with-definition-conflict/a.js

@ -0,0 +1,3 @@
export var foo = 'a-foo';
export var bar = 'a-bar';
export var baz = 'a-baz';

9
test/function/export-from-with-definition-conflict/main.js

@ -0,0 +1,9 @@
var foo = 'local-foo';
var baz = 'local-baz';
export { foo as bar } from './a';
export { bar as foo } from './a';
export { baz } from './a';
assert.equal( foo, 'b-foo' );
assert.equal( baz, 'b-baz' );

12
test/function/export-from-with-import-conflict/_config.js

@ -0,0 +1,12 @@
var assert = require( 'assert' );
module.exports = {
description: 'ignores conflict between import declaration and export from declaration',
exports: function ( exports ) {
assert.equal( exports.foo, 'a-bar' );
assert.equal( exports.bar, 'a-foo' );
assert.equal( exports.baz, 'a-baz' );
}
};
// https://github.com/rollup/rollup/issues/16

3
test/function/export-from-with-import-conflict/a.js

@ -0,0 +1,3 @@
export var foo = 'a-foo';
export var bar = 'a-bar';
export var baz = 'a-baz';

2
test/function/export-from-with-import-conflict/b.js

@ -0,0 +1,2 @@
export var foo = 'b-foo';
export var baz = 'b-baz';

8
test/function/export-from-with-import-conflict/main.js

@ -0,0 +1,8 @@
import { foo, baz } from './b';
export { foo as bar } from './a';
export { bar as foo } from './a';
export { baz } from './a';
assert.equal( foo, 'b-foo' );
assert.equal( baz, 'b-baz' );
Loading…
Cancel
Save