MCPcopy Create free account
hub / github.com/angular/angular / MockConsole

Class MockConsole

packages/core/test/application_ref_spec.ts:1048–1060  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1046});
1047
1048class MockConsole {
1049 res: any[][] = [];
1050 log(...args: any[]): void {
1051 // Logging from ErrorHandler should run outside of the Angular Zone.
1052 NgZone.assertNotInAngularZone();
1053 this.res.push(args);
1054 }
1055 error(...args: any[]): void {
1056 // Logging from ErrorHandler should run outside of the Angular Zone.
1057 NgZone.assertNotInAngularZone();
1058 this.res.push(args);
1059 }
1060}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected