-
Notifications
You must be signed in to change notification settings - Fork 9k
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
Having issues with jest testing going from swagger-ui-react 4.19.1 to 5.X cannot find module '#swagger-ui' #10149
Comments
I'm getting the same issue. Would also appreciate some help 🙏 |
One thing I have tried which didn't work: In jest I have used the The reason I am mapping to that specific file is because in the package.json within the
The module mapper looks like this:
This is the output:
I have gone a few layers deep with this mapping (i.e. mapping the
|
Q&A (please complete the following information)
Screenshots
How can we help?
Snippet of my code that I am testing:
When I was running create react app (react-scripts 5.0.1) and jest with swagger-react-ui 4.19.1 I had no issues with jest rendering the SwaggerUI component from
swagger-ui-react
. Everything ran and the tests all passed.Due to a security vulnerability in 4.19.1 I am being forced to upgrade to swagger-react-ui 5.X (currently trying the latest which is 5.17.14 as of writting this.
When I run jest it looks like it's trying to pull from the
node_modules/swagger-ui-react/index.cjs
which is what i'd expect... however within that file there is a line that looks like this:This is where jest cannot find
#swagger-ui
module.I would like to say that as far as my react-app goes everything runs just fine, it's ONLY testing with jest do i get this issue.
Any help is appreciated.
The text was updated successfully, but these errors were encountered: