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

es6 modules do not work with the jest #19047

Closed
1 task done
DenysVuika opened this issue Sep 28, 2019 · 3 comments
Closed
1 task done

es6 modules do not work with the jest #19047

DenysVuika opened this issue Sep 28, 2019 · 3 comments
Assignees

Comments

@DenysVuika
Copy link

DenysVuika commented Sep 28, 2019

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

just a generic link as you form enforces that
Edit on CodeSandbox

Steps to reproduce

  1. generate app with create react app
  2. use Layout component
  3. run "yarn test"

What is expected?

tests run

What is actually happening?

({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import Layout from './layout';
                                                                                                ^^^^^^

SyntaxError: Unexpected identifier

> 1 | import Layout from 'antd/es/layout';
Environment Info
antd 3.23.4
React 16.9.0
System macOS
Browser all
@shaodahong
Copy link
Member

https://jestjs.io/docs/en/tutorial-react

@DenysVuika
Copy link
Author

how that answers the question and closes the ticket?

@shaodahong
Copy link
Member

your question is Jest issue, you can report in Jest repository

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

No branches or pull requests

3 participants