combine the 'beforeEach' and 'afterEach' cases