mirror of
https://github.com/systemjs/systemjs.git
synced 2026-02-01 15:59:54 +00:00
27 lines
810 B
JavaScript
27 lines
810 B
JavaScript
suite('Named exports', function () {
|
|
System = new System.constructor();
|
|
|
|
test('Loading an AMD module with named exports', function () {
|
|
return System.import('fixtures/amd-module.js').then(function (m) {
|
|
assert.ok(m.default);
|
|
assert.equal(m.dep, m.default.dep);
|
|
assert.equal(m.amd, true);
|
|
});
|
|
});
|
|
|
|
test('Loading a global with named exports support', function () {
|
|
return System.import('fixtures/global3.js').then(function (m) {
|
|
assert.ok(m.default);
|
|
assert.equal(m.default.some, 'thing');
|
|
});
|
|
});
|
|
|
|
test('System.register untouched', function () {
|
|
return System.import('fixtures/register-default.js').then(function (m) {
|
|
assert.ok(m.default);
|
|
assert.equal(m.default.name, 'value');
|
|
assert.equal(m.name, undefined);
|
|
});
|
|
});
|
|
|
|
}); |