Skip to content

Commit

Permalink
Update dev deps + build targets
Browse files Browse the repository at this point in the history
  • Loading branch information
simov committed Sep 16, 2024
1 parent d74e8ac commit f04208c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 28 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
os:
- ubuntu-latest
node:
- 22
- 20
- 18
- 16
- 14
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
},
"dependencies": {},
"devDependencies": {
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"qs": "^6.11.0",
"mocha": "^10.7.3",
"nyc": "^17.0.0",
"qs": "^6.13.0",
"request-cookie": "^1.0.0",
"request-logs": "^2.1.5",
"request-multipart": "^1.0.0",
Expand Down
42 changes: 18 additions & 24 deletions test/utils/logs-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ var http = require('http')
var cp = require('child_process')


var res = parseInt(/v(\d{2})/.exec(process.version)[1]) <= 18 ?
`res 200 OK
date: noop
connection: close
transfer-encoding: chunked`
:
`res 200 OK
date: noop
connection: keep-alive
keep-alive: timeout=5
transfer-encoding: chunked`

var defaults =
`req POST http://localhost:5000/1
content-length: 1
Expand All @@ -20,22 +32,13 @@ req POST http://localhost:5000/3
Host: localhost:5000
body
c
res 200 OK
date: noop
connection: close
transfer-encoding: chunked
${res}
body
2
res 200 OK
date: noop
connection: close
transfer-encoding: chunked
${res}
body
3
res 200 OK
date: noop
connection: close
transfer-encoding: chunked
${res}
body
1
`
Expand All @@ -46,32 +49,23 @@ var sync =
Host: localhost:5000
body
b
res 200 OK
date: noop
connection: close
transfer-encoding: chunked
${res}
body
2
req POST http://localhost:5000/3
content-length: 1
Host: localhost:5000
body
c
res 200 OK
date: noop
connection: close
transfer-encoding: chunked
${res}
body
3
req POST http://localhost:5000/1
content-length: 1
Host: localhost:5000
body
a
res 200 OK
date: noop
connection: close
transfer-encoding: chunked
${res}
body
1
`
Expand Down
9 changes: 8 additions & 1 deletion test/utils/logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,19 @@ req.json =
`json
client: hey`

res.head =
res.head = parseInt(/v(\d{2})/.exec(process.version)[1]) <= 18 ?
`res 200 OK
content-type: application/json
date: noop
connection: close
transfer-encoding: chunked`
:
`res 200 OK
content-type: application/json
date: noop
connection: keep-alive
keep-alive: timeout=5
transfer-encoding: chunked`

res.body =
`body
Expand Down

0 comments on commit f04208c

Please sign in to comment.