Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ghost opened this issue Nov 13, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 13, 2014

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.

@rbabayoff
Copy link
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.

@kevitan
Copy link

kevitan commented Oct 28, 2016

has this been addressed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants