Skip to content

Commit c17c1f2

Browse files
Uzlopakcrysmags
authored andcommitted
fix: reduce noice in test logs (nodejs#2654)
1 parent 681dfa8 commit c17c1f2

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

test/client-node-max-header-size.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
'use strict'
22

33
const { execSync } = require('node:child_process')
4-
const { test } = require('tap')
4+
const { throws, doesNotThrow } = require('node:assert')
5+
const { test } = require('node:test')
56

67
const 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
/UND_ERR_HEADERS_OVERFLOW/,
1213
'max-http-header-size=1 should throw'
1314
)
1415

15-
t.doesNotThrow(
16+
doesNotThrow(
1617
() => execSync(command),
1718
/UND_ERR_HEADERS_OVERFLOW/,
1819
'default max-http-header-size should not throw'
1920
)
20-
21-
t.end()
2221
})

0 commit comments

Comments
 (0)