Welcome to mirror list, hosted at ThFree Co, Russian Federation.

beforeEach-hook-async-error.fixture.js « hooks « fixtures « integration « test « mocha-3.1.0 « lib « tests - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a34ed755e2cf329b9a1bab37e328943e59c99e3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
describe('spec 1', function () {
  beforeEach(function (done) {
    console.log('before');
    process.nextTick(function () {
      throw new Error('before each hook error');
    });
  });
  it('should not be called because of error in before each hook', function () {
    console.log('test 1');
  });
  it('should not be called because of error in before each hook', function () {
    console.log('test 2');
  });
});
describe('spec 2', function () {
  it('should be called, because hook error was in a sibling suite', function () {
    console.log('test 3');
  });
});