ember-cli-code-coverage icon indicating copy to clipboard operation
ember-cli-code-coverage copied to clipboard

Add template instrumentation.

Open rwjblue opened this issue 7 years ago • 13 comments

This PR adds support for instrumentation of templates roughly the same as JS instrumentation (using a custom set of helpers and a template AST transform to instrument templates).

There are still some issues with this approach that we need to vet/review.

  • [ ] Need more testing with "real world" templates.
  • [ ] Add logic in treeFor to prevent app and addon tree from being emitted unless COVERAGE=true.
  • [ ] Figure out how to handle instrumentation of usages of htmlbars-inline-precompiler.
  • [x] Fix issues with istanbul parsing coverage data.
  • [x] Decide if we are willing to do a major version bump, or if we have to rewrite in ES5.

Paired on this with @rondale-sc.

rwjblue avatar Mar 19 '17 03:03 rwjblue

Decide if we are willing to do a major version bump, or if we have to rewrite in ES5.

@kategengler - Thoughts on this one?

rwjblue avatar Mar 19 '17 13:03 rwjblue

OK, this is working now. Here is an example after running the test suite of Ember Observer:

screenshot

rwjblue avatar Mar 19 '17 16:03 rwjblue

That's amazing!

kellyselden avatar Mar 19 '17 16:03 kellyselden

Seconding amazing!

For:

Decide if we are willing to do a major version bump, or if we have to rewrite in ES5.

I'm fine with a major version bump.

kategengler avatar Mar 20 '17 06:03 kategengler

@rwjblue This does look amazing - any updates?

jrowlingson avatar Sep 20 '17 20:09 jrowlingson

@rwjblue how can I help get this across the finish line?

RobbieTheWagner avatar Sep 27 '17 12:09 RobbieTheWagner

Yes, same thoughts about amazing and how can we get this merged?

Also, would it show coverage for the js side of helpers/components?

knownasilya avatar Oct 18 '17 14:10 knownasilya

@knownasilya this is likely on hold, due to the new spike. We'll be updating a lot in the coming weeks.

RobbieTheWagner avatar Oct 18 '17 15:10 RobbieTheWagner

This looks really nice. Would like to see this make it in 👍

peabnuts123 avatar Nov 27 '17 00:11 peabnuts123

@kategengler @rwjblue Are there any plans on this being completed soon?

StevenElberger avatar Mar 01 '19 16:03 StevenElberger

The general idea here is still valid, just need to complete off the to do items.

rwjblue avatar Sep 17 '20 13:09 rwjblue

@rwjblue If this is on hold, is there any way i can contribute and get this merged ? Really looking forward to use this.

harishv98 avatar May 05 '21 17:05 harishv98

Given that template only components are a prevalent thing, this would seem even more important

cah-brian-gantzler avatar Jun 09 '21 05:06 cah-brian-gantzler