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

ESM build causes previously passing Jest tests to fail #113

Open
Byron-Wall opened this issue Oct 24, 2019 · 1 comment

Comments

@Byron-Wall
Copy link

@Byron-Wall Byron-Wall commented Oct 24, 2019

Thanks for opening an issue!

Please select the type of issue you're reporting. For questions.

  • [x ] Bug
  • [x ] Feature Request
  • Question

Problem Report

Please describe the problem here.
Previously passing jest tests fail with the output:

Details:

node_modules/react-resizable/node_modules/react-draggable/build/Draggable.js:56
            prevPropsPosition: { ...position
                                 ^^^

    SyntaxError: Unexpected token ...

System Info

Node Version: 6.14.4
Browser: JSDOM
OS: X

Reproduction

Run a jest test on a component that imports react-resizable

#######FIX############
the fix is:
add react-resizable to the projects' jest config's transformIgnorePatterns, like so:

    "transformIgnorePatterns": [
      "<rootDir>/node_modules/(?!react-resizable)"
    ],
@Byron-Wall

This comment has been minimized.

Copy link
Author

@Byron-Wall Byron-Wall commented Oct 24, 2019

I'd guess the feature request is really a docs PR, which I can do later if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.