Running tests on a form which sends an http request, while waiting for a toastify popup saying it was successful throws this error.
Error: The element you provided cannot be rendered. You provided an element of type object
at ToastContainer.buildToast (http:/localhost:3000/static/js/0.chunk.js:106457:13)
at http:/localhost:3000/static/js/0.chunk.js:106386:34
at http:/localhost:3000/static/js/0.chunk.js:105841:18
at Suite.<anonymous> (src/__tests__/Home.test.js:27:3)
Inside the puppeteer instance, console says the http response is 404 as well.
To Reproduce
Have a form with react-toastify in use. Install jest-puppeteer and add this config:
Tests run fine with manual config for Jest and Puppeteer or without the jest-dev-server config. Expected this to get a 200 response and render the popup properly.
🐛 Bug Report
Running tests on a form which sends an http request, while waiting for a toastify popup saying it was successful throws this error.
Inside the puppeteer instance, console says the http response is 404 as well.
To Reproduce
Have a form with react-toastify in use. Install jest-puppeteer and add this config:
Expected behavior
Tests run fine with manual config for Jest and Puppeteer or without the jest-dev-server config. Expected this to get a 200 response and render the popup properly.
envinfo