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

BUG-1: Jest Testing Failing on ES6 Imports #27

Closed
RGPosadas opened this issue Feb 24, 2020 · 6 comments
Closed

BUG-1: Jest Testing Failing on ES6 Imports #27

RGPosadas opened this issue Feb 24, 2020 · 6 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@RGPosadas
Copy link
Owner

RGPosadas commented Feb 24, 2020

Bug Description

Jest fails when it sees an import on ES6 assets.

Steps To Reproduce The Bug

> npm test

What Is The Expected Result?

Jest passes the test.

What Is The Actual Result?

Jest fails on import ... line (see screenshot below)
Current upstream issue, but solution did not work for us:
https://stackoverflow.com/questions/55794280/jest-fails-with-unexpected-token-on-import-statement
Reasoning: jest uses node, and node doesn't understand ES6 imports

Current Strategy

[ ] Fix it now
[x] Fix it later
[ ] Ignore it

Additional Details/Screenshots

image.png

@RGPosadas RGPosadas added the bug Something isn't working label Feb 24, 2020
@RGPosadas
Copy link
Owner Author

Tests disabled for now until we have more bandwidth to work on this
image

@RGPosadas
Copy link
Owner Author

@RGPosadas RGPosadas self-assigned this Feb 24, 2020
@RGPosadas RGPosadas added this to the SPRINT #2 milestone Feb 24, 2020
@RGPosadas
Copy link
Owner Author

Update to someone who wants to pick this up:
Through working on this bug, Detox should have been initialized along with Jest, therefore will work on #31 and see if this bug is recreated

@RGPosadas
Copy link
Owner Author

BLOCKS:
#31

@RGPosadas
Copy link
Owner Author

UPDATE:
Blocks future testing efforts
Possible babel issue/config

@RGPosadas
Copy link
Owner Author

UPDATE-2:
Reconfigured repo from scratch, but issue still happens specifically on react-native-screens after applying all recorded methods to solve uncompiled ES6 modules

Filed this in hopes of someone answering it:
https://stackoverflow.com/questions/60425485/jest-test-fails-on-react-native-screens-even-after-being-compiled-through-transf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant