diff --git a/test/request.ts b/test/request.ts index 6dc1c39e..47d7ac68 100644 --- a/test/request.ts +++ b/test/request.ts @@ -1022,16 +1022,6 @@ describe('request', function () { }) describe('non-confirmable retries', function () { - let clock - - beforeEach(function () { - clock = useFakeTimers() - }) - - afterEach(function () { - clock.restore() - }) - function doReq (): OutgoingMessage { return request({ port, @@ -1039,13 +1029,6 @@ describe('request', function () { }).end() } - function fastForward (increase, max): void { - clock.tick(increase) - if (increase < max) { - originalSetImmediate(fastForward.bind(null, increase, max - increase)) - } - } - it('should timeout after ~202 seconds', function (done) { const req = doReq() @@ -1135,16 +1118,6 @@ describe('request', function () { }) describe('confirmable retries', function () { - let clock - - beforeEach(function () { - clock = useFakeTimers() - }) - - afterEach(function () { - clock.restore() - }) - function doReq (): OutgoingMessage { return request({ port, @@ -1152,13 +1125,6 @@ describe('request', function () { }).end() } - function fastForward (increase, max): void { - clock.tick(increase) - if (increase < max) { - originalSetImmediate(fastForward.bind(null, increase, max - increase)) - } - } - it('should error after ~247 seconds', function (done) { const req = doReq() @@ -1627,23 +1593,6 @@ describe('request', function () { }) describe('token', function () { - let clock - - beforeEach(function () { - clock = useFakeTimers() - }) - - afterEach(function () { - clock.restore() - }) - - function fastForward (increase, max): void { - clock.tick(increase) - if (increase < max) { - originalSetImmediate(fastForward.bind(null, increase, max - increase)) - } - } - it('should timeout if the response token size doesn\'t match the request\'s', function (done) { const req = request({ port