Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

🔧: Fixing Jest coverage collection and cleaning up config for Jest 22 prep#5193

Merged
jasonLaster merged 1 commit into
firefox-devtools:masterfrom
wldcordeiro:fix-jest-coverage
Jan 25, 2018
Merged

🔧: Fixing Jest coverage collection and cleaning up config for Jest 22 prep#5193
jasonLaster merged 1 commit into
firefox-devtools:masterfrom
wldcordeiro:fix-jest-coverage

Conversation

@wldcordeiro
Copy link
Copy Markdown
Contributor

Associated Issue: #5100

Summary of Changes

  • Add collectCoverageFrom to the Jest config to get a more accurate report
  • consolidate test/tests-setup and test/tests-framework as they both were just setting up Jest environment.
  • upgrade jest-junit-reporter and jest-localstorage-mock since they had no breaking changes or effect.
  • Rename some test files to match the .spec.js pattern we've moved to
  • Prettier found somethings in the mochis it didn't like? 🤷‍♂️

Sad but good news, our coverage dropped from ~62% to ~43%, it's lame to see a lower number but it's more accurate so it's a win in the long run!

…for Jest 22

This fixes the coverage collection so it is looking at more of our source. Sadly this means our 62%
coverage was really 43% but now we have that knowledge!
Copy link
Copy Markdown
Contributor

@jasonLaster jasonLaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good. Why do we delete some of these test files?

@wldcordeiro
Copy link
Copy Markdown
Contributor Author

@jasonlaster11 the only file I deleted was the tests-framework file but I moved its content to tests-setup since both were only preparing the Jest environment.

@jasonLaster
Copy link
Copy Markdown
Contributor

weird it looks like some specs were deleted

@wldcordeiro
Copy link
Copy Markdown
Contributor Author

Nah I just renamed a few that were missing the ".spec.js" in their name.

@jasonLaster jasonLaster merged commit 523fab6 into firefox-devtools:master Jan 25, 2018
@wldcordeiro wldcordeiro deleted the fix-jest-coverage branch January 25, 2018 16:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants