We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Managing Application State in Elixir Tests
184
clicks
Source: reddit.com
sectional343 has an application with a specific supervision hierarchy and encounters issues when running unit tests. By default, Elixir starts the entire application for tests and doesn't restart it between them, leading to flaky tests as one test's state affects subsequent tests. The author finds this behavior counterintuitive, as they expect a clean state for each test. They ask the community for advice on whether stopping and restarting the application manually in each test setup or using the `--no-start` flag is a correct solution or if their application architecture might be flawed.
Related posts
© HashMerge 2024