Add deprecation messages for things that will change/break in 3.0

[#154746527]
This commit is contained in:
Gregg Van Hove
2018-02-05 14:01:46 -08:00
parent 24bf3489dc
commit c142490c69
8 changed files with 62 additions and 11 deletions

View File

@@ -258,7 +258,7 @@ jasmineRequire.HtmlReporter = function(j$) {
var warningBarClassName = 'jasmine-bar jasmine-warning';
for(i = 0; i < deprecationWarnings.length; i++) {
var warning = deprecationWarnings[i];
alert.appendChild(createDom('span', {className: warningBarClassName}, 'DEPRECATION: ' + warning.message));
alert.appendChild(createDom('span', {className: warningBarClassName}, 'DEPRECATION: ' + warning));
}
var results = find('.jasmine-results');
@@ -336,8 +336,13 @@ jasmineRequire.HtmlReporter = function(j$) {
return this;
function addDeprecationWarnings(result) {
if (result && result.deprecationWarnings && result.deprecationWarnings.length > 0) {
deprecationWarnings = deprecationWarnings.concat(result.deprecationWarnings);
if (result && result.deprecationWarnings) {
for(var i = 0; i < result.deprecationWarnings.length; i++) {
var warning = result.deprecationWarnings[i].message;
if (deprecationWarnings.indexOf(warning) < 0) {
deprecationWarnings.push(warning);
}
}
}
}