3 ms·
"This second round of forking provides a layer of isolation between tests: If a test makes changes to global state, running the test inside a throwaway process
by vkjv 11y ago
"This second round of forking provides a layer of isolation between tests: If a test makes changes to global state, running the test inside a throwaway process will clean everything up once that process exits."
But, then how do you catch bugs where shared mutable state is not compatible with multiple changes?
- praxulus 11y agoYou write tests specifically for testing multiple changes. You shouldn't be testing changes to global state by seeing how multiple supposedly independent tests interact.
- ambicapter 11y agoIs there any value in designing tests in such a way that they test multiple things at once while still being able to isolate which specific thing is responsible for breaking? I'm thinking of something like JMP.