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

Warning: "exclude follow-redirects from browser builds" when running Axios tests in Jest #15298

Closed
kemaltf opened this issue Sep 11, 2024 · 2 comments

Comments

@kemaltf
Copy link

kemaltf commented Sep 11, 2024

Steps to Reproduce:

  • I'm using Axios for making HTTP requests in my Node.js project.
  • When running Jest tests that involve Axios (e.g., axios.get()), I consistently see this warning in the console output.
  • The tests themselves are passing, but the warning appears every time.

What I've Tried:

  • I have ensured that Jest is configured to use testEnvironment: 'node'.
  • I have attempted to mock Axios and the follow-redirects module to avoid the issue.
  • I reviewed my Jest setup to ensure that browser-specific builds are not being triggered, but the warning persists across all test files.
  • Running npm ls follow-redirects shows that Axios is the only direct dependency using this package.

My Environment:

  • Axios Version: 1.7.7
  • Jest Version: 29.7.0
Copy link

Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant