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

Fixed issues with landing page tests #61

Merged
merged 11 commits into from
Apr 2, 2024
Merged

Fixed issues with landing page tests #61

merged 11 commits into from
Apr 2, 2024

Conversation

ajbieber
Copy link
Owner

I was successfully able to replicate the error you had @key-er when running the landing page tests. The following resolutions were required:

  1. To fix the cross origin request error, we needed to add global.XMLHttpRequest = undefined; to the Jest setupTests file, as per this article.
  2. We had to remove axios from the tests as it was expecting the xhr and http adapters to be present. I did some research and found no good resolution to this.I attempted to replace the use of axios with fetch and it worked no issue. So upon removing axios, I rewrote your tests to use the fetch API.
  3. To use the fetch API, I had to define fetch as a global in the Jest config as per this article.

@ajbieber ajbieber added the Bug Something isn't working label Mar 30, 2024
@ajbieber ajbieber requested a review from key-er March 30, 2024 14:45
Copy link

vercel bot commented Mar 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vision-aid-partners ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 30, 2024 6:17pm

@key-er key-er merged commit 036bb72 into main Apr 2, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants