MSW (mock service worker) compatibility #1181
|
Wondering if anyone is using testcontainers with MSW? I have been using testcontainers:node to run my db during tests, I added MSW to mock some external urls and have been running into some issues (only on github actions) where the container no longer finishes setting up due to its health checks failing Using MSW 2.12.1 I'm hoping I just am not writing the handlers regex here but I've tried a number of variations I've added unhandled bypass to the server start I came to the above handlers from these logs which indicate they're trying to use localhost:5432 |
Replies: 1 comment 1 reply
|
We use it in the gcloud module: There used to be an issue with an older version of msw not playing well with the Docker socket, but that was fixed a few months back. If you update msw/Testcontainers I reckon everything is working. |
We use it in the gcloud module:
testcontainers-node/packages/modules/gcloud/src/cloudstorage-emulator-container.test.ts
Lines 34 to 48 in d399600
There used to be an issue with an older version of msw not playing well with the Docker socket, but that was fixed a few months back. If you update msw/Testcontainers I reckon everything is working.