Refactor suite test.
Optimisation: run `beforeEach`/`afterEach` only when needed.