co-IT/schematics

[jest] schematic does not work with Angular CLI 8 generated projects

Opened this issue · 2 comments

# Error
tsconfig.spec.json not found
  • tsconfig is now located in the root of the project.
  • the location of tsconfig should be read from angular.json
  • store jest.config in root

We can use @schematics/angular/utility to access Angular workspace:

import { getWorkspace } from '@schematics/angular/utility/config';
import { ProjectType } from '@schematics/angular/utility/workspace-models';