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

Function verifyOutput

packages/compiler-cli/test/ngtsc/ngtsc_spec.ts:1127–1147  ·  view source on GitHub ↗
(jsContents: string)

Source from the content-addressed store, hash-verified

1125 `;
1126
1127 const verifyOutput = (jsContents: string) => {
1128 // verify that there is no pattern that triggers automatic semicolon
1129 // insertion by checking that there are no function return statements
1130 // not wrapped in parentheses
1131 expect(trim(jsContents)).not.toMatch(/return\s+function/);
1132 expect(trim(jsContents)).toContain(
1133 trim(`
1134 [{
1135 provide: 'token-a',
1136 useFactory: ((service) => {
1137 return (() => service.id);
1138 })
1139 }, {
1140 provide: 'token-b',
1141 useFactory: (function (service) {
1142 return (function () { return service.id; });
1143 })
1144 }]
1145 `),
1146 );
1147 };
1148
1149 it('should wrap functions in "providers" list in NgModule', () => {
1150 env.tsconfig({

Callers 1

ngtsc_spec.tsFile · 0.85

Calls 1

trimFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…