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

Function createTests

packages/core/schematics/test/all-migrations.spec.ts:75–108  ·  view source on GitHub ↗
(migrationName: string)

Source from the content-addressed store, hash-verified

73 }
74
75 function createTests(migrationName: string) {
76 // Regression test for: https://github.com/angular/angular/issues/36346.
77 it('should not throw if non-existent symbols are imported with rootDirs', async () => {
78 writeFile(
79 `/tsconfig.json`,
80 JSON.stringify({
81 compilerOptions: {
82 rootDirs: ['./generated'],
83 },
84 }),
85 );
86 writeFile(
87 '/index.ts',
88 `
89 import {Renderer} from '@angular/core';
90
91 const variableDecl: Renderer = null;
92
93 export class Test {
94 constructor(renderer: Renderer) {}
95 }
96 `,
97 );
98
99 let error: any = null;
100 try {
101 await runMigration(migrationName);
102 } catch (e) {
103 error = e;
104 }
105
106 expect(error).toBe(null, migrationName);
107 });
108 }
109});

Callers 1

Calls 3

writeFileFunction · 0.70
runMigrationFunction · 0.70
itFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…