diff --git a/packages/core/schematics/test/project_tsconfig_paths_spec.ts b/packages/core/schematics/test/project_tsconfig_paths_spec.ts index 7fdda4de7e2..4ac2825394e 100644 --- a/packages/core/schematics/test/project_tsconfig_paths_spec.ts +++ b/packages/core/schematics/test/project_tsconfig_paths_spec.ts @@ -8,6 +8,7 @@ import {HostTree} from '@angular-devkit/schematics'; import {UnitTestTree} from '@angular-devkit/schematics/testing'; + import {getProjectTsConfigPaths} from '../utils/project_tsconfig_paths'; describe('project tsconfig paths', () => { @@ -27,17 +28,18 @@ describe('project tsconfig paths', () => { expect((await getProjectTsConfigPaths(testTree)).buildPaths).toEqual(['my-custom-config.json']); }); - it('should be able to read workspace configuration which is using JSON5 features', async () => { - testTree.create('/my-build-config.json', ''); - testTree.create('/angular.json', `{ - version: 1, - // Comments, unquoted properties or trailing commas are only supported in JSON5. - projects: { - with_tests: { - targets: { - build: { - options: { - tsConfig: './my-build-config.json', + it('should be able to read workspace configuration which is using jsconc-parser features', + async () => { + testTree.create('/my-build-config.json', ''); + testTree.create('/angular.json', `{ + "version": 1, + // Comments are supported in the workspace configurations. + "projects": { + "with_tests": { + "targets": { + "build": { + "options": { + "tsConfig": "./my-build-config.json", } } } @@ -45,8 +47,10 @@ describe('project tsconfig paths', () => { }, }`); - expect((await getProjectTsConfigPaths(testTree)).buildPaths).toEqual(['my-build-config.json']); - }); + expect((await getProjectTsConfigPaths(testTree)).buildPaths).toEqual([ + 'my-build-config.json' + ]); + }); it('should detect test tsconfig path inside of angular.json file', async () => { testTree.create('/my-test-config.json', '');