correct wrong use of beforeEach
add testEach and testCount helper for test