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 11'use strict'
22
33const { execSync } = require ( 'node:child_process' )
4- const { test } = require ( 'tap' )
4+ const { throws, doesNotThrow } = require ( 'node:assert' )
5+ const { test } = require ( 'node:test' )
56
67const command = 'node -e "require(\'.\').request(\'https://httpbin.org/get\')"'
78
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' } ) ,
1112 / U N D _ E R R _ H E A D E R S _ O V E R F L O W / ,
1213 'max-http-header-size=1 should throw'
1314 )
1415
15- t . doesNotThrow (
16+ doesNotThrow (
1617 ( ) => execSync ( command ) ,
1718 / U N D _ E R R _ H E A D E R S _ O V E R F L O W / ,
1819 'default max-http-header-size should not throw'
1920 )
20-
21- t . end ( )
2221} )
You can’t perform that action at this time.
0 commit comments