Skip to content

Commit

Permalink
test: fix close server
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Feb 8, 2024
1 parent 64c68cb commit e89835c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@
"license": "MIT",
"ava": {
"files": [
"!test/helpers.js",
"test/**/*.js"
"test/**/*.js",
"!test/helpers.js"
]
},
"commitlint": {
Expand Down
4 changes: 2 additions & 2 deletions test/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

const { default: listen } = require('async-listen')
const { createServer } = require('http')
const { promisify } = require('util')

const closeServer = server => promisify(server.close)
const closeServer = server =>
require('util').promisify(server.close.bind(server))()

const runServer = async (t, handler) => {
const server = createServer(async (req, res) => {
Expand Down

0 comments on commit e89835c

Please sign in to comment.