Skip to content

Commit

Permalink
skip bundle test on node 16 (#2377)
Browse files Browse the repository at this point in the history
* skip bundle test on node 16

* skip more tests

* fix
  • Loading branch information
KhafraDev committed Oct 25, 2023
1 parent 67e714d commit 3ec35ee
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
9 changes: 8 additions & 1 deletion test/fetch/bundle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
'use strict'

const { test } = require('tap')
const { test, skip } = require('tap')
const { nodeMajor } = require('../../lib/core/util')

if (nodeMajor === 16) {
skip('esbuild uses static blocks with --keep-names which node 16.8 does not have')
process.exit()
}

const { Response, Request, FormData, Headers } = require('../../undici-fetch')

test('bundle sets constructor.name and .name properly', (t) => {
Expand Down
8 changes: 7 additions & 1 deletion test/fetch/client-node-max-header-size.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
'use strict'

const { execSync } = require('node:child_process')
const { test } = require('tap')
const { test, skip } = require('tap')
const { nodeMajor } = require('../../lib/core/util')

if (nodeMajor === 16) {
skip('esbuild uses static blocks with --keep-names which node 16.8 does not have')
process.exit()
}

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

Expand Down
8 changes: 7 additions & 1 deletion test/fetch/issue-1447.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
'use strict'

const { test } = require('tap')
const { test, skip } = require('tap')
const { nodeMajor } = require('../../lib/core/util')

if (nodeMajor === 16) {
skip('esbuild uses static blocks with --keep-names which node 16.8 does not have')
process.exit()
}

const undici = require('../..')
const { fetch: theoreticalGlobalFetch } = require('../../undici-fetch')
Expand Down
9 changes: 8 additions & 1 deletion test/fetch/user-agent.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
'use strict'

const { test } = require('tap')
const { test, skip } = require('tap')
const events = require('events')
const http = require('http')
const undici = require('../../')
const { nodeMajor } = require('../../lib/core/util')

if (nodeMajor === 16) {
skip('esbuild uses static blocks with --keep-names which node 16.8 does not have')
process.exit()
}

const nodeBuild = require('../../undici-fetch.js')

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

0 comments on commit 3ec35ee

Please sign in to comment.