This reverts commit 708d0a2db20705e4cd88a8247bea92a8b70d575c. Reason: this causes failures in g3 with i18n extraction. See #31267. PR Close #31267
This commit is contained in:
		
							parent
							
								
									26a85a82ff
								
							
						
					
					
						commit
						8afc998ec4
					
				| @ -13,7 +13,7 @@ import {setup} from './test_support'; | |||||||
| describe('ngc_wrapped', () => { | describe('ngc_wrapped', () => { | ||||||
| 
 | 
 | ||||||
|   it('should work', () => { |   it('should work', () => { | ||||||
|     const {read, write, runOneBuild, writeConfig, shouldExist, basePath, typesRoots} = setup(); |     const {read, write, runOneBuild, writeConfig, shouldExist, basePath} = setup(); | ||||||
| 
 | 
 | ||||||
|     write('some_project/index.ts', ` |     write('some_project/index.ts', ` | ||||||
|       import {Component} from '@angular/core'; |       import {Component} from '@angular/core'; | ||||||
| @ -21,8 +21,11 @@ describe('ngc_wrapped', () => { | |||||||
|       console.log('works: ', Component); |       console.log('works: ', Component); | ||||||
|     `);
 |     `);
 | ||||||
| 
 | 
 | ||||||
|  |     const tsconfig = writeConfig({ | ||||||
|  |       srcTargetPath: 'some_project', | ||||||
|  |     }); | ||||||
|     const typesFile = path.resolve( |     const typesFile = path.resolve( | ||||||
|         basePath, typesRoots, 'thing', |         tsconfig.compilerOptions.rootDir, tsconfig.compilerOptions.typeRoots[0], 'thing', | ||||||
|         'index.d.ts'); |         'index.d.ts'); | ||||||
| 
 | 
 | ||||||
|     write(typesFile, ` |     write(typesFile, ` | ||||||
| @ -31,11 +34,6 @@ describe('ngc_wrapped', () => { | |||||||
|       } |       } | ||||||
|     `);
 |     `);
 | ||||||
| 
 | 
 | ||||||
|     writeConfig({ |  | ||||||
|       srcTargetPath: 'some_project', |  | ||||||
|       depPaths: [path.dirname(typesFile)], |  | ||||||
|     }); |  | ||||||
| 
 |  | ||||||
|     // expect no error
 |     // expect no error
 | ||||||
|     expect(runOneBuild()).toBe(true); |     expect(runOneBuild()).toBe(true); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -17,7 +17,6 @@ export interface TestSupport { | |||||||
|   basePath: string; |   basePath: string; | ||||||
|   runfilesPath: string; |   runfilesPath: string; | ||||||
|   angularCorePath: string; |   angularCorePath: string; | ||||||
|   typesRoots: string; |  | ||||||
|   writeConfig({ |   writeConfig({ | ||||||
|       srcTargetPath, depPaths, pathMapping, |       srcTargetPath, depPaths, pathMapping, | ||||||
|   }: { |   }: { | ||||||
| @ -50,22 +49,17 @@ export function setup( | |||||||
|   const angularCorePath = path.dirname(require.resolve('angular/packages/core')); |   const angularCorePath = path.dirname(require.resolve('angular/packages/core')); | ||||||
|   const tsConfigJsonPath = path.resolve(basePath, tsconfig); |   const tsConfigJsonPath = path.resolve(basePath, tsconfig); | ||||||
| 
 | 
 | ||||||
|   const emptyTsConfig = ts.readConfigFile( |  | ||||||
|       require.resolve('angular/packages/bazel/test/ngc-wrapped/empty/empty_tsconfig.json'), read); |  | ||||||
|   const typesRoots = (emptyTsConfig as any).config.compilerOptions.typeRoots[0]; |  | ||||||
| 
 |  | ||||||
|   return { |   return { | ||||||
|     basePath, |     basePath, | ||||||
|     runfilesPath, |     runfilesPath, | ||||||
|     angularCorePath, |     angularCorePath, | ||||||
|     typesRoots, |  | ||||||
|     write, |     write, | ||||||
|     read, |     read, | ||||||
|     writeFiles, |     writeFiles, | ||||||
|     writeConfig, |     writeConfig, | ||||||
|     shouldExist, |     shouldExist, | ||||||
|     shouldNotExist, |     shouldNotExist, | ||||||
|     runOneBuild: runOneBuildImpl, |     runOneBuild: runOneBuildImpl | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   // -----------------
 |   // -----------------
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user