diff --git a/packages/compiler-cli/src/ngtsc/testing/src/utils.ts b/packages/compiler-cli/src/ngtsc/testing/src/utils.ts index f2c84d263d..d1597de5a6 100644 --- a/packages/compiler-cli/src/ngtsc/testing/src/utils.ts +++ b/packages/compiler-cli/src/ngtsc/testing/src/utils.ts @@ -60,7 +60,8 @@ export function getDeclaration( throw new Error(`No such symbol: ${name} in ${fileName}`); } if (!assert(chosenDecl)) { - throw new Error(`Symbol ${name} from ${fileName} is a ${ts.SyntaxKind[chosenDecl.kind]}`); + throw new Error(`Symbol ${name} from ${fileName} is a ${ + ts.SyntaxKind[chosenDecl.kind]}. Expected it to pass predicate "${assert.name}()".`); } return chosenDecl; }