You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FAIL ./App.test.js
β Test suite failed to run
ReferenceError: FormData is not defined
at Object.<anonymous> (node_modules/react-native-aws3-cognito/lib/Request.js:148:20)
at Object.<anonymous> (node_modules/react-native-aws3-cognito/lib/RNS3.js:16:16)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 2.619s
Ran all test suites.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ test: `jest`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ test script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
That's likely not an issue with transformation. The error is ReferenceError: FormData is not defined which means there's no FormData available for some reason. You'll need to dig in into node_modules to see why.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions. You'll find more on Jest docs help page. Thank you :)
FormData is not a global in Node, so if your testEnvironment is node (or a derivation of it) it won't be available. You can probably polyfill it in a setupFile though.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
π Bug Report
To Reproduce
Follow setup instructions here
https://docs.expo.io/versions/latest/guides/testing-with-jest/
Install react-native-aws3-cognito in your project
Execute
npm run test
Attempt to include
react-native-aws3-cognito
inpackage.json
transformIgnorePatterns
like soNote that error still occurs
Expected behavior
Tests would run without error
envinfo
The text was updated successfully, but these errors were encountered: