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

regression: uncaught exceptions reporting several times #195

Closed
tj opened this issue Jan 6, 2012 · 0 comments
Closed

regression: uncaught exceptions reporting several times #195

tj opened this issue Jan 6, 2012 · 0 comments
Labels
type: bug a defect, confirmed by a maintainer

Comments

@tj
Copy link
Contributor

tj commented Jan 6, 2012

require('should')

describe('tests: ', function(){
  it('test 1', function (done){
    setTimeout(function() {
      'one'.should.be.equal(1);
      done();
    }, 2000);
  });

  it('test 2', function(){
    'two'.should.be.equal('two');
  });

  it('test 3', function(done){
    process.nextTick(function(){
      'foo'.should.equal('foo');
      done();
    });
  })
})

outputs:


   λ mocha (master): ./bin/mocha test

  ....

  ✖ 2 of 3 tests failed:

  0) tests:  test 1:
     AssertionError: expected 'one' to equal 1
      at Object.equal (/Users/tj/Projects/mocha/node_modules/should/lib/should.js:306:10)
      at Object._onTimeout (/Users/tj/Projects/mocha/test.js:7:23)
      at Timer.ontimeout (timers.js:84:39)

  1) tests:  test 1:
     AssertionError: expected 'one' to equal 1
      at Object.equal (/Users/tj/Projects/mocha/node_modules/should/lib/should.js:306:10)
      at Object._onTimeout (/Users/tj/Projects/mocha/test.js:7:23)
      at Timer.ontimeout (timers.js:84:39)

@tj tj closed this as completed in d520a87 Jan 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

No branches or pull requests

1 participant