Running tests in docker fails, but works outside of docker
I am attempting to set up a Docker development environment for a SolidJS application using Docker Compose. When I access the webpage via localhost:3000, the application renders without issues. However, when I attempt to run npm test using vitest inside the Docker container, I run into a problem. The issue appears to be with the render function, as it does not seem to render the application correctly within the Docker container. The debug output only shows
<body><div /><body>
. Interestingly, when I run npm test outside the Docker container on my local machine, the test passes just fine and the debug correctly renders the application.
Here's the relevant code from my test file:
My test file:
The App.tsx file:
The npm test
output
My docker files:
2 Replies