Skip to content

Conversation

@austingreendev
Copy link
Contributor

  • BREAKING CHANGE

Description

My original implementation of matchExports included a nested expect 😢and wasn't the most readable.

This PR adds a BREAKING CHANGE to react-testing by removing the matchExports utility with a more generalized getExports.

I've also updated all necessary tests to use asyn/await as necessary.

Checklist

  • 👌 design updates are Garden Designer approved (add the
    designer as a reviewer)
  • 💅 view component styling is based on a Garden CSS
    component
  • 🌐 Styleguidist demo is up-to-date (yarn start)
  • ⬅️ renders as expected with reversed (RTL) direction
  • 💂‍♂️ includes new unit and snapshot tests
  • 📝 tested in Chrome, Firefox, Safari, Edge, and IE11

Enzyme.configure({ adapter: new Adapter() });

// Enable async/await
import '@babel/polyfill';
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this if we're running in a node version that supports it natively?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From what I could tell, yes 😭 The jest environment is slightly different

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would continually run into regeneratorRuntime errors

Copy link
Member

@jzempel jzempel left a comment

Choose a reason for hiding this comment

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

😛

@austingreendev austingreendev merged commit 7280879 into master Dec 7, 2018
@austingreendev austingreendev deleted the agreen/update-match-exports branch December 7, 2018 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants