refactor(core): improve messages for static-query migrations (#30458)

Slightly improves the messages for the static-query migration in order
to make the terminal output less verbose but more helpful. Unfortunately
we are limited in what we can print due to the devkit not providing much
utilities for printing good messages from a migration schematic.

PR Close #30458
This commit is contained in:
Paul Gschwendtner
2019-05-14 20:59:21 +02:00
committed by Alex Rickabaugh
parent 0cdf5980e2
commit 9e5377a2e3
4 changed files with 14 additions and 18 deletions

View File

@ -602,7 +602,7 @@ describe('static-queries migration with template strategy', () => {
.toContain(`@ViewChild('myRef', /* TODO: add static flag */ myOptionsVar) query: any;`);
expect(warnOutput.length).toBe(1);
expect(warnOutput[0])
.toMatch(/^⮑ {3}index.ts@8:11: Cannot update query declaration to explicit timing./);
.toMatch(/^⮑ {3}index.ts@8:11: Cannot update query to set explicit timing./);
expect(warnOutput[0]).toMatch(/Please manually set the query timing to.*static: true/);
});