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

exit.spec.js « misc « acceptance « 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: 113e392300145edc41629a956f5dd5d7204cf199 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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) {}
  });
})