How to reuse beforeEach/afterEach in Jasmine JS?
When writing tests with JasmineJS I have many tests that have similar beforeEach/afterEach code. Is there a way to implement an inheritance model using JasmineJS test suites? I can group all tests in a single describe but in this case I will end with a single HUGE JS file containing all tests. I would like to split the tests for each page. Here is an example: describe('Services Page', function() { beforeEach(function() { login_as_admin() }) beforeEach(function() { browser().navigateTo('/services') }) if('Some test for services page', function() {}) afterEach(function() { logout() }) })