(expected: T)
| 60 | * @param expected Expected value. |
| 61 | */ |
| 62 | export function matchDebug<T>(expected: T): any { |
| 63 | const matcher = function () {}; |
| 64 | let actual: any = matchDebug; |
| 65 | |
| 66 | matcher.asymmetricMatch = function (objectWithDebug: any, matchersUtil: jasmine.MatchersUtil) { |
| 67 | return matchersUtil.equals((actual = objectWithDebug.debug), expected); |
| 68 | }; |
| 69 | matcher.jasmineToString = function (pp: (value: any) => string) { |
| 70 | if (actual === matchDebug) { |
| 71 | // `asymmetricMatch` never got called hence no error to display |
| 72 | return ''; |
| 73 | } |
| 74 | return buildFailureMessage(actual, expected, pp); |
| 75 | }; |
| 76 | return matcher; |
| 77 | } |
| 78 | |
| 79 | export function buildFailureMessage( |
| 80 | actual: any, |
no test coverage detected
searching dependent graphs…