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

multiple-done.spec.js « browser « 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: d8a9d49ae221e0becb137604dc24ca0c4a585caf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
describe('Multiple Done calls', function(){
  it('should report an error if done was called more than once', function(done){
    done();
    done();
  })

  it('should report an error if an exception happened async after done was called', function (done) {
    done();
    setTimeout(done, 50);
  })

  it('should report an error if an exception happened after done was called', function(done){
    done();
    throw new Error("thrown error");
  })
})