Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(jest-config-carbon): update transform ignore, add watch plugins #8952

Merged

Conversation

joshblack
Copy link
Contributor

This PR updates our jest-config-carbon package in a couple of ways:

  • Files in es, lib, or umd are no longer transformed, these paths have been added to the transformIgnorePatterns options
  • Watch plugins have been added to make it easier to find files

The first update reduced the overall test time by ~27% on my machine (down to ~180s), the second is a QOL change for watch mode.

Changelog

New

  • Add jest.config.js for the default test config
  • Add jest.e2e.config.js for the e2e test config

Changed

  • Update the default jest config to exclude transforming es/lib/umd files (like icons)
  • Add watch plugins to Jest config

Removed

Testing / Reviewing

  • Verify tests pass as expected, both unit and e2e
  • Try out the watch plugins locally if you want! Just run yarn test --watch and filter by filename or test name to see the suggestions pop up

@joshblack joshblack requested a review from a team as a code owner June 18, 2021 17:03
@joshblack joshblack changed the title Chore/update jest config feat(jest-config-carbon): update transform ignore, add watch plugins Jun 18, 2021
@netlify
Copy link

netlify bot commented Jun 18, 2021

✔️ Deploy Preview for carbon-elements ready!

🔨 Explore the source changes: e3d0a21

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/60d11e7f3b543e00080903e1

😎 Browse the preview: https://deploy-preview-8952--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented Jun 18, 2021

✔️ Deploy Preview for carbon-components-react ready!
Built without sensitive environment variables

🔨 Explore the source changes: e3d0a21

🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/60d11e7f9416e50007b6a304

😎 Browse the preview: https://deploy-preview-8952--carbon-components-react.netlify.app

Copy link
Member

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

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

LGTM 👍 ✅

@kodiakhq kodiakhq bot merged commit 92a9288 into carbon-design-system:main Jun 21, 2021
@jnm2377 jnm2377 mentioned this pull request Jun 22, 2021
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants