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

Replace Karma With Jest #1627

Merged
merged 3 commits into from
Feb 3, 2020
Merged

Conversation

carsonreinke
Copy link
Contributor

@carsonreinke carsonreinke commented Jan 30, 2020

What?

Simply replace Karma with Jest.

Jest is far superior, a lot easier, and more popular. This all started from me trying to write a test with Karma for assets/js/theme/common/state-country.js, but basically could not even get it to work. Using Jest was simple and easy and definitely appears to be a better direction.

Tickets / Documentation

Some oddities:

  • jest-eventemitter2-transformer.js: required to get Babel and eventemitter2 to work together, it is absurd, but is needed unless stencil-utils is updated
  • jest-setup.js: Foundation expects certain things and jsdom (used by Jest) has no layout dimensions

Screenshots (if appropriate)

N/A

Thanks @jbruni and @martinchuka for helping me solve some very complicated problems.

@bigbot
Copy link

bigbot commented Jan 30, 2020

Autotagging @bigcommerce/storefront-team @davidchin

@bookernath
Copy link
Contributor

@carsonreinke WOW, thanks for this!

I don't feel qualified to review it, but I'll try to get some attention on it from our team soon.

@ncheikh ncheikh merged commit cf1c2d3 into bigcommerce:master Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants