Skip to content

Fix for running react scripts test#6

Open
xyide wants to merge 3 commits intohexetia:mainfrom
xyide:main
Open

Fix for running react scripts test#6
xyide wants to merge 3 commits intohexetia:mainfrom
xyide:main

Conversation

@xyide
Copy link
Copy Markdown

@xyide xyide commented Apr 24, 2022

When trying to mount components via enzyme for testing, if a component is using react-fitty then tests will fail with an error messaging saying "SyntaxError: Unexpected token 'export'. This is due to the fitty package's main rollup file fitty.module.js

To resolve the error, react-fitty needs to be updated to use
const fitty = require('fitty/dist/fitty.min.js');

instead of
import fitty from 'fitty';

This PR also includes updates to run tests locally.

@nate-h
Copy link
Copy Markdown

nate-h commented Jul 9, 2023

bump. also getting:
SyntaxError: Unexpected token 'export'
while using react scripts.

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.

2 participants