Skip to content

Commit 7f89afb

Browse files
authored
style: use property shorthand (#193)
1 parent ed2e585 commit 7f89afb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/hooks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ test('Should not hijack reply for a normal http request in the internal onError
230230

231231
const port = fastify.server.address().port
232232

233-
const httpClient = net.createConnection({ port: port }, () => {
233+
const httpClient = net.createConnection({ port }, () => {
234234
t.teardown(httpClient.destroy.bind(httpClient))
235235

236236
httpClient.write('GET / HTTP/1.1\r\n\r\n')
@@ -302,7 +302,7 @@ test('Should not hijack reply for an normal request to a websocket route that is
302302

303303
const port = fastify.server.address().port
304304

305-
const httpClient = net.createConnection({ port: port }, () => {
305+
const httpClient = net.createConnection({ port }, () => {
306306
t.teardown(httpClient.destroy.bind(httpClient))
307307
httpClient.write('GET /echo HTTP/1.1\r\n\r\n')
308308
httpClient.once('data', data => {

test/router.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,15 +298,15 @@ test('Should invoke the correct handler depending on the headers', t => {
298298

299299
const port = fastify.server.address().port
300300

301-
const httpClient = net.createConnection({ port: port }, () => {
301+
const httpClient = net.createConnection({ port }, () => {
302302
httpClient.write('GET / HTTP/1.1\r\n\r\n')
303303
httpClient.once('data', data => {
304304
t.match(data.toString(), /hi from handler/i)
305305
httpClient.end()
306306
})
307307
})
308308

309-
const wsClient = net.createConnection({ port: port }, () => {
309+
const wsClient = net.createConnection({ port }, () => {
310310
wsClient.write('GET / HTTP/1.1\r\nConnection: upgrade\r\nUpgrade: websocket\r\nSec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\nSec-WebSocket-Version: 13\r\n\r\n')
311311
wsClient.once('data', data => {
312312
t.match(data.toString(), /hi from wsHandler/i)

0 commit comments

Comments
 (0)