Remix.run Logo
jitl 7 months ago

Process isolation is an absolute non-negotiable must for any seriously sized project (>50 developers) I’ve worked on

loevborg 7 months ago | parent [-]

If you start the project with good hygiene and clear guidelines (no mutable global state), it's 100% doable.

AFAIK JUnit and other test runners don't do any process isolation for unit tests. Why is JavaScript so different?

jitl 7 months ago | parent [-]

Many major 3rd party libraries in Javascript either have their own global state, like React, or you interact with platform global state, like NodeJS `process` global (eg `process.on(signal, handler)`) or browser `window.navigator` or `window.document` globals. I have also heard plenty of horror stories about Java unit testing pain and suffering from developer tools engineers supporting Java, after all that's why Bazel is so focused on "hermetic" everything.

If I could just make some rules that all engineers would follow exactly, I'd simply make a rule "write no bugs" and then I wouldn't need a test framework at all.