Use @angular/builder:jest for schematic
Closed this issue · 0 comments
GregOnNet commented
Acceptance Criteria
- Executing
@co-it/schematics:jest
- uses the default project defined in angular.json
- adds @angular-builders/jest to
devDependencies
- removes
karma.config
- removes
test.ts
- replaces karma-builder in angular.json with
@angular-builders/jest:run
- clears the karma related options in angular.json
- sets
"module": "commonjs"
in tsconfig.spec.js - sets
"types": ["jest"]
in tsconfig.spec.js - adds a
jest.config.js
in thesrc/
directory of the respective project
- Executing
@co-it/schematics:jest --project my-project
- uses the given project defined in angular.json
- yields an error if the project does not exist.
- configures jest in the given project