beforeEach and afterEach block is not called for tests in nested describe blocks.
Example:
describe('Package', function () {
beforeEach(function () {
console.log('beforeEach')
});
describe('method1', function () {
it('does something', function () {
console.log('method1')
});
});
describe('method2', function () {
it('does something', function () {
console.log('method2')
});
});
});
I expect that the beforeEach block runs before each of the it blocks.
beforeEach and afterEach block is not called for tests in nested describe blocks.
Example:
I expect that the beforeEach block runs before each of the it blocks.