Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add experimental precompilation to global setup #1434

Closed
wants to merge 1 commit into from
Closed

feat: add experimental precompilation to global setup #1434

wants to merge 1 commit into from

Conversation

ahnpnl
Copy link
Collaborator

@ahnpnl ahnpnl commented Apr 28, 2022

Summary

Precompilation uses TypeScript API + Angular AST transformers to compile all files which are included in the tsconfig file one is using for Jest.

With precompilation, the precompiled output is written in disk and ng-jest-transformer will read disk to get it. After that ng-jest-transformer can reuse the precompilation output to reduce the resources to compile codes as well as fixing some issues related to missing source files in compiler

Fixes #963
Fixes #1199

Caveats

TypeScript solution style is not supported yet. To workaround it, one needs to specify a wild card syntax in the tsconfig file which is provided to ngJest option.

Test plan

Added example test cases from the linked issues.
Green CI

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

N.A.

Precompilation uses TypeScript API + Angular AST transformers to compile all files which are included in the tsconfig file one is using for Jest.

With precompilation, the precompiled output is written in disk and `ng-jest-transformer` will read disk to get it. After that `ng-jest-transformer` can reuse the precompilation output to reduce the resources to compile codes as well as fixing some issues related to missing source files in compiler.

## Caveats

TypeScript solution style is not supported yet. To workaround it, one needs to specify a wild card syntax in the tsconfig file which is provided to `ngJest` option.
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant