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

exit.spec.js « misc « acceptance « 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: 916752f9b129c5d76f972fb299e8a730b5d8d986 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'use strict';

describe('exit', function () {
  // note --bail works nicely in that it still allows an 'early exit' in an error scenario
  it('should not exit even in error scenario if called with --no-exit', function (done) {
    done(new Error('failure'));
  });

  it('should take a long time to exit if called with --no-exit', function (done) {
    done();
    setTimeout(function () {
      console.log('all done');
    }, 2500);
  });

  it('should kill all processes when SIGINT received', function () {
    // uncomment to test
    // while (true) {}
  });
});