Skip to content

beforeEach and afterEach block is not called for tests in nested describe blocks #24

@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions