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

Function verifyThrownError

packages/compiler-cli/test/ngtsc/ngtsc_spec.ts:2846–2853  ·  view source on GitHub ↗
(errorCode: ErrorCode, errorMessage: string)

Source from the content-addressed store, hash-verified

2844
2845 describe('error handling', () => {
2846 function verifyThrownError(errorCode: ErrorCode, errorMessage: string) {
2847 const errors = env.driveDiagnostics();
2848 expect(errors.length).toBe(1);
2849 const {code, messageText} = errors[0];
2850 expect(code).toBe(ngErrorCode(errorCode));
2851 const text = ts.flattenDiagnosticMessageText(messageText, '\n');
2852 expect(trim(text)).toContain(errorMessage);
2853 }
2854
2855 it('should throw if invalid arguments are provided in @NgModule', () => {
2856 env.tsconfig({});

Callers 1

ngtsc_spec.tsFile · 0.85

Calls 5

ngErrorCodeFunction · 0.90
driveDiagnosticsMethod · 0.80
mapMethod · 0.80
trimFunction · 0.70
joinMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…