I have onPrepare in my conf.js file where I log in to the application. My understanding is every time I run 1 or more test suites, it first executes whatever is in onPrepare. This is great, as I use onPrepare to log into the application before running the tests.
Issue is, I don't want to login when I run my login-spec.js suite.
I could first logout before running through login-spec.js, but there must be a more elegant way to do this.
As far as I understand, you need a place for suite-specific preparations.
This is what
jasmine
can help you with.For
jasmine
2.1 and above, there are built-inbeforeAll
andafterAll
notations:If you are on an older
jasmine
version, use a separatejasmine-beforeAll
package.