Jasmine describe override
Say you want to test your Angular application.
To do that you’ll be implementing Unit tests (with the Jasmine + Karma + PhantomJS stack) or E2E tests (with the Jasmine + Protractor stack). You could choose any other stack using Cucumber, mocha, chai or any other testing framework – the principle of today’s topic remains the same.
The scenario is this: There’s this piece of setup code that needs to be executed before each spec in every suite (performing login, for example). I chose before each spec for the sake of the argument, but the same concept could be applied to before all specs in the suite and/or after each and after all specs in the suite.
Read more here.