File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
3
const { execSync } = require ( 'node:child_process' )
4
- const { test } = require ( 'tap' )
4
+ const { throws, doesNotThrow } = require ( 'node:assert' )
5
+ const { test } = require ( 'node:test' )
5
6
6
7
const command = 'node -e "require(\'.\').request(\'https://httpbin.org/get\')"'
7
8
8
- test ( "respect Node.js' --max-http-header-size" , async ( t ) => {
9
- t . throws (
10
- ( ) => execSync ( `${ command } --max-http-header-size=1` ) ,
9
+ test ( "respect Node.js' --max-http-header-size" , ( ) => {
10
+ throws (
11
+ ( ) => execSync ( `${ command } --max-http-header-size=1` , { stdio : 'pipe' } ) ,
11
12
/ U N D _ E R R _ H E A D E R S _ O V E R F L O W / ,
12
13
'max-http-header-size=1 should throw'
13
14
)
14
15
15
- t . doesNotThrow (
16
+ doesNotThrow (
16
17
( ) => execSync ( command ) ,
17
18
/ U N D _ E R R _ H E A D E R S _ O V E R F L O W / ,
18
19
'default max-http-header-size should not throw'
19
20
)
20
-
21
- t . end ( )
22
21
} )
You can’t perform that action at this time.
0 commit comments