Skip to content

this.slow() doesn't work in describe callbacks like this.timeout #2311

Closed

Description

describe('a', function() {
  this.timeout(5000);
  this.slow();

  it('1', function(cb) {
    setTimeout(cb, 3000);
  });

  it('2', function(cb) {
    this.slow(); // just for contrast with test 1
    setTimeout(cb, 3000);
  });
});

If I understand the docs correctly, I expect neither of the tests to timeout or have slow warnings because they're both covered by this.timeout and this.slow calls in the describe section. Neither of the tests timeout, but the first test (not covered by its own redundant this.slow) has a slow warning still:

  a
    ✓ 1 (3008ms)
    ✓ 2


  2 passing (6s)

mocha version 2.5.3

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

Metadata

Assignees

No one assigned

    Labels

    type: buga defect, confirmed by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions