WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit a408e50

Browse files
authored
test: skip prisma 7 tests for older Node.js versions (#7050)
Support was dropped by prisma.
1 parent f625887 commit a408e50

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/datadog-plugin-prisma/test/index.spec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const path = require('node:path')
77

88
const { expect } = require('chai')
99
const { after, before, beforeEach, describe, it } = require('mocha')
10+
const semifies = require('semifies')
1011

1112
const { assertObjectContains } = require('../../../integration-tests/helpers')
1213
const { ERROR_MESSAGE, ERROR_TYPE, ERROR_STACK } = require('../../dd-trace/src/constants')
@@ -20,7 +21,10 @@ describe('Plugin', () => {
2021
let tracingHelper
2122

2223
describe('prisma', () => {
23-
withVersions('prisma', ['@prisma/client'], async (range, _moduleName_, version) => {
24+
// Prisma 7.0.0+ is not supported in Node.js < 20.19.0
25+
const supportedRange = semifies(process.version, '>=20.19.0') ? '*' : '>=7.0.0'
26+
27+
withVersions('prisma', ['@prisma/client'], supportedRange, async (range, _moduleName_, version) => {
2428
describe('without configuration', () => {
2529
before(async () => {
2630
const cwd = path.resolve(__dirname, `../../../versions/@prisma/client@${range}`)

0 commit comments

Comments
 (0)