Node.js · Senior · Question 56 of 75

Why does test isolation matter in node --test, and how does it work by default?

Explanation

--test-isolation=none runs files in one process, which is faster but can leak state. Inside one file, tests share state and you must reset it yourself.

Further reading

Problem with a question

Node.js · Senior · question 56

Test yourself

Take the Node.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz