-
Notifications
You must be signed in to change notification settings - Fork 12k
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 aot option to karma #28854
base: main
Are you sure you want to change the base?
Conversation
}) | ||
class Hello {} | ||
|
||
expect((Hello as any).ɵcmp.template.toString()).not.toContain('jit'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fragile and sensitive to any structural changes in JIT. It could easily cause false negatives.
What would be a better way to achieve this detection?
...BASE_OPTIONS, | ||
aot: true, | ||
/** Cf. {@link ../builder-mode_spec.ts} */ | ||
polyfills: ['zone.js', '@angular/localize/init', 'zone.js/testing'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we factorize this in BASE_OPTIONS
? or create a BASE_POLYFILLS
? or an object mother: optionsMother.base().withPolyfills()
?
38ac095
to
48d0a96
Compare
Sorry for the lack of review so far but I just want to quickly say that I'm really excited to see this option added. |
No rush at all! |
PR Checklist
Please check to confirm your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Tests run in JIT only.
What is the new behavior?
Tests can run in AOT, using the new
aot
option.Does this PR introduce a breaking change?
Other information