Skip to content

Commit

Permalink
use semver for skipping
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners-nr committed Jul 17, 2024
1 parent 411e649 commit a163bb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/integration/core/fs.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const helper = require('../../lib/agent_helper')
const verifySegments = require('./verify')
const NAMES = require('../../../lib/metrics/names')

const nodeMajor = parseInt(process.version.split('.')[0].replace('v', ''), 10)
const isGlobSupported = require('semver').satisfies(process.version, '>=22.0.0')

// delete temp files before process exits
temp.track()
Expand Down Expand Up @@ -837,7 +837,7 @@ test('watchFile', function (t) {
}, 10)
})

test('glob', { skip: nodeMajor < 22 }, function (t) {
test('glob', { skip: isGlobSupported === false }, function (t) {
const name = path.join(tempDir, 'glob-me')
const content = 'some-content'
fs.writeFileSync(name, content)
Expand Down

0 comments on commit a163bb8

Please sign in to comment.