Make all tests use syntax compatible with IE6/7/8

This commit is contained in:
Vikki
2012-12-04 16:54:11 +00:00
committed by Davis W. Frank & Rajan Agaskar
parent fd91433792
commit 8b02bf731b
2 changed files with 5 additions and 4 deletions

View File

@@ -82,7 +82,7 @@ describe("jasmine.Matchers", function() {
expect((match(/[abc]/gm).toNotEqual(/1/i))).toPass();
// only test if the browser supports the sticky option on a regExp see pull #234
if (RegExp.prototype.sticky !== undefined) {
if (typeof RegExp.prototype.sticky !== 'undefined') {
var sticky_regexp = new RegExp("[abc]", "y");
expect((match(sticky_regexp).toEqual(/1/i))).toFail();
expect((match(sticky_regexp).toNotEqual(/1/i))).toPass();

View File

@@ -141,9 +141,10 @@ jasmine.ConsoleReporter = function(print, doneCallback, showColors) {
failedSpecResults: []
};
suite.results().items_.forEach(function(spec) {
for(var i = 0; i < suite.results().items_.length; i++) {
var spec = suite.results().items_[i];
if (spec.failedCount > 0 && spec.description) suiteResult.failedSpecResults.push(spec);
});
}
this.suiteResults.push(suiteResult);
};
@@ -174,4 +175,4 @@ jasmine.ConsoleReporter = function(print, doneCallback, showColors) {
summaryFunction(runner.specs().length, results.failedCount);
doneCallback(runner);
};
};
};