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

after-hook-async-error.fixture.js « hooks « fixtures « integration « test « mocha-3.1.2 « lib « tests - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f3dfe7e1aea943a70d29b82bbcd6090ff9524542 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
'use strict';

describe('spec 1', function () {
  after(function (done) {
    console.log('after');
    process.nextTick(function () {
      throw new Error('after hook error');
    });
  });
  it('should be called because error is in after hook', function () {
    console.log('test 1');
  });
  it('should be called because error is in after 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');
  });
});