mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
When running tests with code coverage using Istanbul, the code is instrumented with coverage reporting statements. These statements are also inserted into synthesized constructors, preventing Angular from properly recognizing them as synthesized constructor. This commit changes the regex to detect synthesized constructors to allow for statements within the constructor before the `super(...arguments);` call. This is limited to code that does not contain a `}`, but this is sufficient to support Istanbul's coverage instrumentation statements. The tests have been extended with an input file that is being instrumented using `babel-plugin-istanbul` for both ES2015 and ES5 targets, in order to verify that the approach works for real-world usages. Fixes #31337 PR Close #44732 |
||
|---|---|---|
| .. | ||
| es2015_inheritance_fixture.ts | ||
| reflector_spec.ts | ||