modified tests to use beforeEach