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

Coverage report is missing when using Jest and neutrino v7 #643

Closed
okonet opened this issue Dec 20, 2017 · 5 comments
Closed

Coverage report is missing when using Jest and neutrino v7 #643

okonet opened this issue Dec 20, 2017 · 5 comments
Labels

Comments

@okonet
Copy link
Contributor

okonet commented Dec 20, 2017

When using neutrino v7 with Jest preset, the coverage report is missing reporting:

Test Suites: 23 passed, 23 total
Tests:       1 skipped, 150 passed, 151 total
Snapshots:   105 passed, 105 total
Time:        11.409s
Ran all test suites.
----------|----------|----------|----------|----------|----------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
All files |  Unknown |  Unknown |  Unknown |  Unknown |                |
----------|----------|----------|----------|----------|----------------|

It was working in v6

@okonet
Copy link
Contributor Author

okonet commented Jan 4, 2018

It doesn't work on v8 either.

@okonet
Copy link
Contributor Author

okonet commented Jan 4, 2018

Coverage report is present when I'm running jest --coverage instead of neutrino test --coverage

@okonet
Copy link
Contributor Author

okonet commented Jan 4, 2018

Looks similar to jestjs/jest#4967

@eliperelman
Copy link
Member

Replicating:

❯ yarn create @neutrinojs/project jest-coverage-bug
yarn create v1.3.2
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
success Installed "@neutrinojs/create-project@8.0.14" with binaries:
      - create-project
[############################################################################################] 326/327                          _          _
      _ __    ___  _   _ | |_  _ __ (_) _ __    ___
     | '_ \  / _ \| | | || __|| '__|| || '_ \  / _ \
     | | | ||  __/| |_| || |_ | |   | || | | || (_) |
     |_| |_| \___| \__,_| \__||_|   |_||_| |_| \___/

Welcome to Neutrino! 👋
To help you create your new project, I am going to ask you a few questions.

? 🤔  First up, what would you like to create? A web or Node.js application
? 🤔  Next, what kind of application would you like to create? React
? 🤔  Would you like to add a test runner to your project? Jest
? 🤔  Would you like to add linting to your project? None

👌  Looks like I have all the info I need. Give me a moment while I create your project!

   create jest-coverage-bug/package.json
   create jest-coverage-bug/.neutrinorc.js
   create jest-coverage-bug/src/App.css
   create jest-coverage-bug/src/App.jsx
   create jest-coverage-bug/src/index.jsx
   create jest-coverage-bug/test/simple_test.js

⏳  Installing dependencies: prop-types, react, react-dom, react-hot-loader
⏳  Installing devDependencies: @neutrinojs/react, neutrino, @neutrinojs/jest

Hooray, I successfully created your project!

I have added a few yarn scripts to help you get started:
  • To build your project run:  yarn build
  • To start your project locally run:  yarn start
  • To execute tests run:  yarn test

Now change your directory to the following to get started:
  cd jest-coverage-bug

❤️  Neutrino
✨  Done in 34.80s.

/var/folders/dl/9lrzd5110zlft676qdpr7xn40000gp/T 35s
❯ cd jest-coverage-bug

/var/folders/dl/9lrzd5110zlft676qdpr7xn40000gp/T/jest-coverage-bug
❯ yarn test --coverage
yarn run v1.3.2
$ neutrino test --coverage
 PASS  test/simple_test.js

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        1.018s
Ran all test suites.
----------|----------|----------|----------|----------|----------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines |Uncovered Lines |
----------|----------|----------|----------|----------|----------------|
All files |  Unknown |  Unknown |  Unknown |  Unknown |                |
----------|----------|----------|----------|----------|----------------|
✨  Done in 4.50s.

@okonet
Copy link
Contributor Author

okonet commented Jan 8, 2018

@eliperelman just tested and #659 should fix it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
2 participants