Browse Source

add failing test

contingency-plan
Rich Harris 10 years ago
parent
commit
b5498c28b7
  1. 10
      test/function/export-default-as/_config.js
  2. 1
      test/function/export-default-as/bar.js
  3. 1
      test/function/export-default-as/baz.js
  4. 1
      test/function/export-default-as/foo.js
  5. 8
      test/function/export-default-as/main.js
  6. 1
      test/function/export-default-as/namespace.js

10
test/function/export-default-as/_config.js

@ -0,0 +1,10 @@
var assert = require( 'assert' );
module.exports = {
description: 'exports default-as-named from sibling module',
exports: function ( exports ) {
assert.equal( exports.foo, 'FOO' );
assert.equal( exports.namespace.baz, 'BAZ' );
},
//solo: true
};

1
test/function/export-default-as/bar.js

@ -0,0 +1 @@
export { default as baz } from './baz';

1
test/function/export-default-as/baz.js

@ -0,0 +1 @@
export default 'BAZ';

1
test/function/export-default-as/foo.js

@ -0,0 +1 @@
export default 'FOO';

8
test/function/export-default-as/main.js

@ -0,0 +1,8 @@
import { baz } from './bar';
import * as namespace from './namespace';
assert.equal( baz, 'BAZ' );
assert.equal( namespace.baz, 'BAZ' );
export { default as foo } from './foo';
export { namespace };

1
test/function/export-default-as/namespace.js

@ -0,0 +1 @@
export { default as baz } from './baz';
Loading…
Cancel
Save