Adam Cameron
beforeAll
/ afterAll
lifecycle events are handled via defining a function of that name, and they run once per test bundle file (https://testbox.ortusbooks.com/in-depth/life-cycle-methods/bdd#beforeall).
In other spec-driven testing frameworks, these lifecycle events are specific to the organisational block they are within; eg each describe
block can have its own beforeAll
handler, just like it can have a beforeEach
handler.
I've verified this on Jasmine, Mocha and RSpec. The docs on Jest are unclear, but I think they work the same way as TestBox.
My own expectations are that TestBox ought to work the same as Jasmine, given TestBox is very very similar to it in many regards. And there's a good argument to be had that RSpec is the one to follow for one's expectations for this style of testing framework.
Thoughts? (also ping @lmajano)Adam Cameron
Adam Cameron