We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db834a9 commit c45583dCopy full SHA for c45583d
1 file changed
test/test.js
@@ -607,19 +607,18 @@ var topDescribe = function (type, createServer) {
607
if (parseInt(process.version.split('.')[0].replace(/^v/, ''), 10) > 11) {
608
describe('req.socket', function () {
609
it('should not throw when socket is null', function (done) {
610
- request(createServer(function (req, res, next) {
+ wrapper(request(createServer(function (req, res, next) {
611
res.statusCode = 200
612
res.end('ok')
613
process.nextTick(function () {
614
req.socket = null
615
next(new Error())
616
})
617
}))
618
- .get('/')
619
- .end(function () {
620
- assert.strictEqual(this.res.statusCode, 200)
621
- assert.strictEqual(this.res.text, 'ok')
622
- done()
+ .get('/'))
+ .expect(200)
+ .end(function (err) {
+ done(err)
623
624
625
0 commit comments