Skip to content

Commit 3ec35ee

Browse files
authored
skip bundle test on node 16 (nodejs#2377)
* skip bundle test on node 16 * skip more tests * fix
1 parent 67e714d commit 3ec35ee

File tree

4 files changed

+30
-4
lines changed

4 files changed

+30
-4
lines changed

test/fetch/bundle.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
'use strict'
22

3-
const { test } = require('tap')
3+
const { test, skip } = require('tap')
4+
const { nodeMajor } = require('../../lib/core/util')
5+
6+
if (nodeMajor === 16) {
7+
skip('esbuild uses static blocks with --keep-names which node 16.8 does not have')
8+
process.exit()
9+
}
10+
411
const { Response, Request, FormData, Headers } = require('../../undici-fetch')
512

613
test('bundle sets constructor.name and .name properly', (t) => {

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

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

33
const { execSync } = require('node:child_process')
4-
const { test } = require('tap')
4+
const { test, skip } = require('tap')
5+
const { nodeMajor } = require('../../lib/core/util')
6+
7+
if (nodeMajor === 16) {
8+
skip('esbuild uses static blocks with --keep-names which node 16.8 does not have')
9+
process.exit()
10+
}
511

612
const command = 'node -e "require(\'./undici-fetch.js\').fetch(\'https://httpbin.org/get\')"'
713

test/fetch/issue-1447.js

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

3-
const { test } = require('tap')
3+
const { test, skip } = require('tap')
4+
const { nodeMajor } = require('../../lib/core/util')
5+
6+
if (nodeMajor === 16) {
7+
skip('esbuild uses static blocks with --keep-names which node 16.8 does not have')
8+
process.exit()
9+
}
410

511
const undici = require('../..')
612
const { fetch: theoreticalGlobalFetch } = require('../../undici-fetch')

test/fetch/user-agent.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
'use strict'
22

3-
const { test } = require('tap')
3+
const { test, skip } = require('tap')
44
const events = require('events')
55
const http = require('http')
66
const undici = require('../../')
7+
const { nodeMajor } = require('../../lib/core/util')
8+
9+
if (nodeMajor === 16) {
10+
skip('esbuild uses static blocks with --keep-names which node 16.8 does not have')
11+
process.exit()
12+
}
13+
714
const nodeBuild = require('../../undici-fetch.js')
815

916
test('user-agent defaults correctly', async (t) => {

0 commit comments

Comments
 (0)