mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
627e807eb8
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
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT