Skip to content

Commit

Permalink
ie test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Aug 9, 2015
1 parent 4a945d7 commit e7ac0cc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/core.js
Expand Up @@ -188,7 +188,7 @@ SystemJSLoader.prototype.config = function(cfg) {

this.packages[prop]= this.packages[prop] || {};
for (var q in cfg.packages[p]) {
if (packageProperties.indexOf(q) == -1 && typeof console != 'undefined' && console.warn)
if (indexOf.call(packageProperties, q) == -1 && typeof console != 'undefined' && console.warn)
console.warn('"' + q + '" is not a valid package configuration option in package ' + p);
this.packages[prop][q] = cfg.packages[p][q];
}
Expand Down
2 changes: 1 addition & 1 deletion lib/meta.js
Expand Up @@ -62,7 +62,7 @@
var bestDepth = 0;
var wildcardIndex;
for (var module in meta) {
wildcardIndex = indexOf.call(module, '*');
wildcardIndex = module.indexOf('*');
if (wildcardIndex === -1)
continue;
if (module.substr(0, wildcardIndex) === name.substr(0, wildcardIndex)
Expand Down
10 changes: 6 additions & 4 deletions test/test.js
Expand Up @@ -558,9 +558,7 @@ asyncTest('Loading dynamic modules with __esModule flag set', function() {
}, err);
});

if (ie8)
return;

if (!ie8) {
asyncTest('ES6 named export loading of CJS', function() {
System['import']('tests/es-named-import-cjs.js').then(function(m) {
ok(m.cjsFuncValue === 'named export');
Expand Down Expand Up @@ -779,6 +777,7 @@ asyncTest('Loading two bundles that have a shared dependency', function() {
}, err);
}, err);
});
}

asyncTest("System clone", function() {
var clonedSystem = new System.constructor();
Expand Down Expand Up @@ -821,7 +820,7 @@ asyncTest("Duplicate entries", function() {
});

// new features!!

if (!ie8)
asyncTest('Named imports for non-es6', function() {
System['import']('tests/es6-cjs-named-export.js').then(function(m) {
ok(m.someExport == 'asdf');
Expand Down Expand Up @@ -854,6 +853,7 @@ asyncTest('Multi-format deps meta', function() {
}, err);
});


asyncTest('Wildcard meta', function() {
System.config({
meta: {
Expand Down Expand Up @@ -914,6 +914,7 @@ asyncTest('Package configuration CommonJS config example', function() {
}, err);
});

if (!ie8)
asyncTest('Conditional loading', function() {
System.set('env', System.newModule({ 'browser': 'ie' }));

Expand All @@ -932,6 +933,7 @@ asyncTest('Boolean conditional false', function() {
}, err);
});

if (!ie8)
asyncTest('Boolean conditional true', function() {
System.set('env', System.newModule({ 'js': { 'es5': true } }));

Expand Down
2 changes: 1 addition & 1 deletion test/tests/cs-loader.js
@@ -1,3 +1,3 @@
export function translate(load) {
exports.translate = function translate(load) {
return load.source.replace(/#/g, '');
}

0 comments on commit e7ac0cc

Please sign in to comment.