Skip to content

Commit 1765861

Browse files
authored
test: skip Next.js 16 tests on non-supported Node.js versions (#6780)
1 parent 3e68da8 commit 1765861

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/dd-trace/test/appsec/extended-data-collection.next.plugin.spec.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,22 @@ const { satisfies } = require('semver')
77
const msgpack = require('@msgpack/msgpack')
88

99
const agent = require('../plugins/agent')
10-
const { NODE_MAJOR, NODE_MINOR, NODE_PATCH } = require('../../../../version')
10+
const { NODE_MAJOR, NODE_VERSION } = require('../../../../version')
1111
const { withVersions } = require('../setup/mocha')
1212
const { initApp, startServer } = require('./next.utils')
1313
const { createDeepObject, getWebSpan } = require('./utils')
1414

1515
describe('extended data collection', () => {
1616
withVersions('next', 'next', '>=11.1', version => {
17-
if (version === '>=11.0.0 <13' && NODE_MAJOR === 24 &&
18-
NODE_MINOR === 0 && NODE_PATCH === 0) {
17+
if (version === '>=11.0.0 <13' && NODE_VERSION === '24.0.0') {
1918
// node 24.0.0 fails, but 24.0.1 works
19+
return
2020
}
2121

2222
const realVersion = require(`../../../../versions/next@${version}`).version()
23+
if (satisfies(realVersion, '>=16') && NODE_MAJOR < 20) {
24+
return
25+
}
2326

2427
const tests = [
2528
{

0 commit comments

Comments
 (0)