diff options
Diffstat (limited to 'tests/lib/mocha-3.1.2/test/integration/fixtures/retries/async.fixture.js')
-rw-r--r-- | tests/lib/mocha-3.1.2/test/integration/fixtures/retries/async.fixture.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/lib/mocha-3.1.2/test/integration/fixtures/retries/async.fixture.js b/tests/lib/mocha-3.1.2/test/integration/fixtures/retries/async.fixture.js new file mode 100644 index 0000000000..56d067fc05 --- /dev/null +++ b/tests/lib/mocha-3.1.2/test/integration/fixtures/retries/async.fixture.js @@ -0,0 +1,30 @@ +'use strict'; + +describe('retries', function () { + var times = 0; + before(function () { + console.log('before'); + }); + + after(function () { + console.log('after'); + }); + + beforeEach(function () { + console.log('before each', times); + }); + + afterEach(function () { + console.log('after each', times); + }); + + it('should allow override and run appropriate hooks', function (done) { + this.timeout(200); + this.retries(2); + console.log('TEST', times); + if (++times < 3) { + return setTimeout(done, 300); + } + setTimeout(done, 50); + }); +}); |