Skip to content

Commit

Permalink
chore: improve coverage of socket.js (#2593)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Feb 26, 2024
1 parent e8044c6 commit 652c689
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/got/test_request_overrider.js
Expand Up @@ -650,6 +650,16 @@ describe('Request Overrider', () => {
})
})

it('socket has write() method', done => {
nock('http://example.test').get('/').reply(200, 'hey')

const req = http.get('http://example.test')
req.once('socket', socket => {
socket.write(true)
done()
})
})

it('socket has ref() and unref() method', done => {
nock('http://example.test').get('/').reply(200, 'hey')

Expand Down

0 comments on commit 652c689

Please sign in to comment.