MCPcopy Index your code
hub / github.com/angular/angular / matchDebug

Function matchDebug

packages/core/test/render3/utils.ts:62–77  ·  view source on GitHub ↗
(expected: T)

Source from the content-addressed store, hash-verified

60 * @param expected Expected value.
61 */
62export 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
79export function buildFailureMessage(
80 actual: any,

Callers 2

i18n_parse_spec.tsFile · 0.90
i18n_spec.tsFile · 0.90

Calls 1

buildFailureMessageFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…