Integration tests in Elm?

#1

Hey everyone,

I wonder if there are any methods to do integration tests in Elm? Like say we are communicating an API and we want to integration test that and check that all endpoints work as they should. As far as I know there is simply no way to test effects in Elm and ensuring that the endpoint work as they should without manual testing?

#2

Hello!

If you’re hitting your API in your test, then I would recommend just doing a full end-to-end test. Elm is an implementation detail in that case. You want to test from the user’s perspective, hitting your full stack to make sure the full system works together.

Cypress is a pretty popular end-to-end testing framework. Hope that helps!

1 Like
#3

I used to use Cypress, I switched to Jest Puppeteer : much less flaky, several times faster thanks to parallelization. And you can do JS unit tests with Jest if you ever need it.

1 Like
closed #4

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.