0.0.2 • Published 10 years ago

jasmine-async-errors v0.0.2

Weekly downloads
72
License
-
Repository
github
Last release
10 years ago

jasmine-async-errors

Jasmine-oriented domain wrapper to catch those nasty asynchronous errors in your tests

it = require('./index.js').wrap(it);

// now, write your tests as usual
describe('asynchronous jasmine errors', function() {

  it('asynchronous errors are reported', function (done) {

    setTimeout(function outerTimeout() {
      expect(true).toBeTruthy();
        setTimeout(function innerTimeout() {
          expect(true).toBeTruthy();

          bad.code;

          done(); // never called
        });
    });
  });

  it('synchronous tests still work', function () {
    expect(1).toEqual(1);
  });
});


``
0.0.2

10 years ago

0.0.1

10 years ago