Skip to content

Commit

Permalink
#832 Remove socketTimeout test
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwsperber committed Mar 1, 2017
1 parent a40fb62 commit 0a675c2
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions tests/versioned/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,35 +42,6 @@ const runCommonTests = (makeRequest, name) => {
})
.catch(t.threw);
});

test('scope#socketDelay', (t) => {
const timeout = 100;
nock('http://www.example.com')
.get('/')
.socketDelay(timeout)
.reply(200, 'OK');

return makeRequest({
uri: 'www.example.com',
timeout: timeout / 2
})
.then((res) => {
const code = res.statusCode;
const err = code === 200
? new Error('Unexpected success')
: new Error(`Unexpected failure (${code})`);

throw err;
})
.catch((error) => {
if (error.message.match('Unexpected')) {
t.fail(`No timeout: ${error.message}`);
}

t.end();
})
.catch(t.threw);
});
};

module.exports = {
Expand Down

0 comments on commit 0a675c2

Please sign in to comment.