MCPcopy
hub / github.com/angular/angular / expectNoDiagnostics

Function expectNoDiagnostics

packages/compiler-cli/test/test_support.ts:157–162  ·  view source on GitHub ↗
(options: ng.CompilerOptions, diags: readonly ts.Diagnostic[])

Source from the content-addressed store, hash-verified

155}
156
157export function expectNoDiagnostics(options: ng.CompilerOptions, diags: readonly ts.Diagnostic[]) {
158 const errorDiags = diags.filter((d) => d.category !== ts.DiagnosticCategory.Message);
159 if (errorDiags.length) {
160 throw new Error(`Expected no diagnostics: ${ng.formatDiagnostics(errorDiags)}`);
161 }
162}
163
164export function expectNoDiagnosticsInProgram(options: ng.CompilerOptions, p: ng.Program) {
165 expectNoDiagnostics(options, [

Callers 2

Calls 2

formatDiagnosticsMethod · 0.80
filterMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…