(runable, runableType, result)
| 1362 | } |
| 1363 | |
| 1364 | function recordLateExpectation(runable, runableType, result) { |
| 1365 | const delayedExpectationResult = {} |
| 1366 | Object.keys(result).forEach(function(k) { |
| 1367 | delayedExpectationResult[k] = result[k] |
| 1368 | }) |
| 1369 | delayedExpectationResult.passed = false |
| 1370 | delayedExpectationResult.globalErrorType = "lateExpectation" |
| 1371 | delayedExpectationResult.message = |
| 1372 | runableType + |
| 1373 | ' "' + |
| 1374 | runable.getFullName() + |
| 1375 | '" ran a "' + |
| 1376 | result.matcherName + |
| 1377 | '" expectation after it finished.\n' |
| 1378 | |
| 1379 | if (result.message) { |
| 1380 | delayedExpectationResult.message += 'Message: "' + result.message + '"\n' |
| 1381 | } |
| 1382 | |
| 1383 | delayedExpectationResult.message += |
| 1384 | "1. Did you forget to return or await the result of expectAsync?\n" + |
| 1385 | "2. Was done() invoked before an async operation completed?\n" + |
| 1386 | "3. Did an expectation follow a call to done()?" |
| 1387 | |
| 1388 | topSuite.result.failedExpectations.push(delayedExpectationResult) |
| 1389 | } |
| 1390 | |
| 1391 | function routeLateFailure(expectationResult) { |
| 1392 | // Report the result on the nearest ancestor suite that hasn't already |
no test coverage detected