Browse Source

test for #154 (shadowed namespaces)

better-aggressive
Rich-Harris 9 years ago
parent
commit
5353ee034d
  1. 3
      test/function/shadowed-namespace/_config.js
  2. 3
      test/function/shadowed-namespace/bar.js
  3. 13
      test/function/shadowed-namespace/main.js

3
test/function/shadowed-namespace/_config.js

@ -0,0 +1,3 @@
module.exports = {
description: 'namespaces are not shadowed'
};

3
test/function/shadowed-namespace/bar.js

@ -0,0 +1,3 @@
export function foo () {
return 'FUBAR';
}

13
test/function/shadowed-namespace/main.js

@ -0,0 +1,13 @@
import * as bar from './bar';
function car () {
var bar = {
foo: function () {
return 42;
}
};
return bar.foo();
}
assert.equal( bar.foo(), 'FUBAR' );
assert.equal( car(), 42 );
Loading…
Cancel
Save