move flush function into afterEach method to flush both requests