tests: add beforeEach hook