Make all tests use syntax compatible with IE6/7/8
This commit is contained in:
committed by
Davis W. Frank & Rajan Agaskar
parent
fd91433792
commit
8b02bf731b
@@ -82,7 +82,7 @@ describe("jasmine.Matchers", function() {
|
|||||||
expect((match(/[abc]/gm).toNotEqual(/1/i))).toPass();
|
expect((match(/[abc]/gm).toNotEqual(/1/i))).toPass();
|
||||||
|
|
||||||
// only test if the browser supports the sticky option on a regExp see pull #234
|
// 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");
|
var sticky_regexp = new RegExp("[abc]", "y");
|
||||||
expect((match(sticky_regexp).toEqual(/1/i))).toFail();
|
expect((match(sticky_regexp).toEqual(/1/i))).toFail();
|
||||||
expect((match(sticky_regexp).toNotEqual(/1/i))).toPass();
|
expect((match(sticky_regexp).toNotEqual(/1/i))).toPass();
|
||||||
|
|||||||
@@ -141,9 +141,10 @@ jasmine.ConsoleReporter = function(print, doneCallback, showColors) {
|
|||||||
failedSpecResults: []
|
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);
|
if (spec.failedCount > 0 && spec.description) suiteResult.failedSpecResults.push(spec);
|
||||||
});
|
}
|
||||||
|
|
||||||
this.suiteResults.push(suiteResult);
|
this.suiteResults.push(suiteResult);
|
||||||
};
|
};
|
||||||
@@ -174,4 +175,4 @@ jasmine.ConsoleReporter = function(print, doneCallback, showColors) {
|
|||||||
summaryFunction(runner.specs().length, results.failedCount);
|
summaryFunction(runner.specs().length, results.failedCount);
|
||||||
doneCallback(runner);
|
doneCallback(runner);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user