Logger.warn("assert.push is deprecated and will be removed in QUnit 3.0."+" Please use assert.pushResult instead (https://api.qunitjs.com/assert/pushResult).");
// 'expected' is optional unless doing string comparison
if(objectType(expected)==="string"){
if(message==null){
message=expected;
expected=null;
}else{
thrownewError("throws/raises does not accept a string value for the expected argument.\n"+"Use a non-string object value (e.g. regExp) instead if it's necessary.");
}
}
currentTest.ignoreGlobalErrors=true;
try{
block.call(currentTest.testEnvironment);
}catch(e){
actual=e;
}
currentTest.ignoreGlobalErrors=false;
if(actual){
varexpectedType=objectType(expected);
// We don't want to validate thrown error
if(!expected){
result=true;
expected=null;
// Expected is a regexp
}elseif(expectedType==="regexp"){
result=expected.test(errorString(actual));
// Expected is a constructor, maybe an Error constructor
message+="<tr class='test-message'><th>Message: </th><td>"+"Diff suppressed as the depth of object is more than current max depth ("+QUnit.config.maxDepth+").<p>Hint: Use <code>QUnit.dump.maxDepth</code> to "+" run with a higher max depth or <a href='"+escapeText(setUrl({maxDepth:-1}))+"'>"+"Rerun</a> without max depth.</p></td></tr>";
}else{
message+="<tr class='test-message'><th>Message: </th><td>"+"Diff suppressed as the expected and actual results have an equivalent"+" serialization</td></tr>";