Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Enable jest coverage for all neutrino extensions #656

Closed
wants to merge 1 commit into from
Closed

Enable jest coverage for all neutrino extensions #656

wants to merge 1 commit into from

Conversation

eliperelman
Copy link
Member

Fixes #643.

@okonet if you apply this patch locally, does it fix the issue for you?

@eliperelman eliperelman requested a review from a team January 5, 2018 17:17
@okonet
Copy link
Contributor

okonet commented Jan 5, 2018

No, this doesn't change anything for me.

@eliperelman
Copy link
Member Author

@okonet do you have a repo or test case I can try it on?

@okonet
Copy link
Contributor

okonet commented Jan 5, 2018

I don't have a repro yet but here is the debug information from my project:

 "collectCoverageFrom": [
      "app/**/*.{js,jsx,vue,ts,mjs}"
    ],

for the .neutrinorc

  options: {
    source: 'src/content/app',
    tests: 'src',
    mains: {
      index: 'web-main.js',
    },
    output: 'build/release/web',
  },

Since I'm co-locating tests with implementation I set the test to src which worked well until v7.

Note how the whole src/content part is missing in Jest config.

@okonet
Copy link
Contributor

okonet commented Jan 5, 2018

Making it a relative path does print coverage but also for all unrelated (i.e. without tests) files.

@okonet
Copy link
Contributor

okonet commented Jan 5, 2018

I just checked the report prior v7 and it looks like collectCoverageFrom wasn't even set so I'm wondering why did you decide to change this from undefined to a specific value?

@eliperelman
Copy link
Member Author

#351

@okonet
Copy link
Contributor

okonet commented Jan 5, 2018

Okay, so I think the solution should be to get the relative path but with the src/content part. Not sure why it gets stripped in my case. Ideas?

@eliperelman
Copy link
Member Author

@okonet any reason your source can't stay as src?

@eliperelman
Copy link
Member Author

Nevermind, I misread something.

@eliperelman
Copy link
Member Author

Closing, superseded by #659.

@eliperelman eliperelman closed this Jan 8, 2018
@edmorley edmorley removed the request for review from a team January 30, 2018 18:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Coverage report is missing when using Jest and neutrino v7
2 participants