angular-builders: Unable to run Jest tests with custom reporter
Describe the bug Unable to run Jest tests with a custom reporter (https://jestjs.io/docs/en/cli#reporters).
To Reproduce
- Run
ng test. OK - Run
ng test --reporters=default. Failure:
ng test --reporters=default
Schema validation failed with the following errors:
Data path ".reporters" should be array.
- Run
ng test --reporters=default --reporters=default. OK
Expected behavior
Jest builder should be able to pass single --reporters option to Jest.
Builder:
@angular-builders/jest@7.0.0
Libraries
@angular-devkit/build-angular@0.10.6
Additional context
Looks like the issue is relevant for some other array options, e.g. --testPathPattern. But the issue is not reproduced for --runTestsByPath, though it doesn’t work with --runTestsByPath either.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 18 (8 by maintainers)
@meltedspark Thanks a lot for the fix!
Looks like, now tests can be run without
=sign too: bothng test --reporters defaultandng test --reporters=defaultwork for me with@angular-builders/jest@7.2.1. BTW, I’m a maintainer of Jest test runner in JetBrains IDEs, feel free to ping me regarding IDE-related issues.@meltedspark JetBrains IDE integration (for Angular projects using Jest runner) passes
--reporter. This issue is required for it to be working.