Skip to content
This repository was archived by the owner on Jul 13, 2020. It is now read-only.

Commit f59e09a

Browse files
committed
Merge pull request #237 from ModuleLoader/exportstar
Export Star tests
2 parents e96441f + 828cc9e commit f59e09a

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

test/syntax/export-star.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './star-dep';
2+
export var bar = 'bar';

test/syntax/export-star2.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export * from './export-star';
2+
export function foo() {
3+
4+
}

test/syntax/star-dep.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export var foo = 'foo';

test/test.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,24 @@ function runTests() {
332332
});
333333
});
334334

335+
test('Export Star 2', function(assert) {
336+
System['import']('syntax/export-star2').then(function(m) {
337+
assert(
338+
[typeof m.foo, 'function'],
339+
[m.bar, 'bar']
340+
);
341+
});
342+
});
343+
344+
test('Export Star', function(assert) {
345+
System['import']('syntax/export-star').then(function(m) {
346+
assert(
347+
[m.foo, 'foo'],
348+
[m.bar, 'bar']
349+
);
350+
});
351+
});
352+
335353
test('Export default 1', function(assert, err) {
336354
System['import']('syntax/export-default').then(function(m) {
337355
assert(m['default'](), 'test');

0 commit comments

Comments
 (0)