Skip to content

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

Open

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.

Activity

  1. rbabayoff commented on Nov 14, 2014

    @rbabayoff
    Member

    I recommend not using nested blocks. Just stick to plain describe.it. We'll get mocha for packages working hopefully soon. Forcing munit describe.it on top of tinytest will just never be like mocha, due to tinytest limitations.

  2. kevitan commented on Oct 28, 2016

    @kevitan

    has this been addressed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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