(
extraOpts: TsConfigOptions = {},
compilerOptions?: TsCompilerOptions,
files?: string[],
)
| 225 | } |
| 226 | |
| 227 | tsconfig( |
| 228 | extraOpts: TsConfigOptions = {}, |
| 229 | compilerOptions?: TsCompilerOptions, |
| 230 | files?: string[], |
| 231 | ): void { |
| 232 | // TODO: all tests should have template that pass strictness |
| 233 | if (!('strictTemplates' in extraOpts)) { |
| 234 | extraOpts['strictTemplates'] = false; |
| 235 | } |
| 236 | |
| 237 | let tsconfig: {[key: string]: any} = { |
| 238 | extends: './tsconfig-base.json', |
| 239 | angularCompilerOptions: extraOpts, |
| 240 | }; |
| 241 | if (files !== undefined) { |
| 242 | tsconfig['files'] = files; |
| 243 | } |
| 244 | if (compilerOptions !== undefined) { |
| 245 | tsconfig['compilerOptions'] = compilerOptions; |
| 246 | } |
| 247 | this.write('tsconfig.json', JSON.stringify(tsconfig, null, 2)); |
| 248 | |
| 249 | if ( |
| 250 | extraOpts['_useHostForImportGeneration'] || |
| 251 | extraOpts['_useHostForImportAndAliasGeneration'] |
| 252 | ) { |
| 253 | setWrapHostForTest(makeWrapHost(new FileNameToModuleNameHost(this.fs))); |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | /** |
| 258 | * Run the compiler to completion, and assert that no errors occurred. |
no test coverage detected