I am trying to get some logic to be called before and after each nested description of the test suite for jasmine that I am writing.
I now have something like this:
describe('Outer describe', function () { beforeEach(function () { login(); someOtherFunc(); }); afterEach(function () { logout(); }); describe('inner describe', function () { it('spec A', function () { expect(true).toBe(true); }); it('spec B', function () { expect(true).toBe(true); }); }); });
I find my functions in beforeEach and afterEach for each it inside my internal description. I want them to be called only once for each internal description that I have in the external.
Is it possible?
javascript jasmine
mindparse
source share