Changed to include depd dependencies and removed unused dependencies
Created a beforeEach to avoid duplicate code