Enforce FE unit coverage with istanbul thresholds
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=17779)
</details>
<!--IssueSummary end-->
Lets start enforcing minimum thresholds.
https://www.npmjs.com/package/karma-istanbul-threshold
We've discussed this **plenty** in the past and I may have opened this issue already, but lets decide on the optimum path.
I see 2 approaches here. 1 is very speedy and the other is **much much much** more useful.
1. Go with the flow (speedy, not that helpful, good start)
1. Find out the minimum individual spec coverage (for each coverage type).
2. Find out the minimum global spec coverage (for each coverage type).
3. Enforce these minimums as the threshold.
4. Increase :fingers_crossed: these threshold after a manual review each month.
2. Force the flow (needs research/code, very useful)
1. Find/build script that will help istanbul distinguish between {+ new +} files and old files.
2. Use script to set a good 90% (or whatever we decide on) threshold for **all** {+ new +} files.
3. Use script to set thresholds for **individual** old files so that the coverage can never **drop**. (So now, if I add a line to some legacy code without a unit, I'm forced to write a partial unit to make sure my specific line (at least, because naturally the instrumentation causes increase coverage just for building and evaluating an _empty_ spec)
/cc @winniehell @mikegreiling
issue