What specifically is the difference between Mocha's before()
and beforeEach()
? (Same question for after()
and afterEach()
.)
I assume before()
runs once per describe()
block, and beforeEach()
runs once per test (it()
block). Is that true?
And when would I choose to use one over the other?