Skip to content

Commit a92f781

Browse files
committed
Skip test on Node 10.
1 parent 9fda712 commit a92f781

File tree

4 files changed

+27
-12
lines changed

4 files changed

+27
-12
lines changed

packages/node-integration-tests/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"private": true,
99
"scripts": {
1010
"clean": "rimraf -g **/node_modules",
11-
"prisma:init": "(cd suites/tracing/prisma-orm && yarn && yarn setup)",
11+
"prisma:init": "(cd suites/tracing/prisma-orm && ./setup.sh)",
1212
"lint": "run-s lint:prettier lint:eslint",
1313
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
1414
"lint:prettier": "prettier --check \"{suites,utils}/**/*.ts\"",

packages/node-integration-tests/suites/tracing/prisma-orm/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"version": "1.0.0",
44
"description": "",
55
"main": "index.js",
6+
"engines": {
7+
"node": ">=12"
8+
},
69
"scripts": {
710
"db-up": "docker-compose up -d",
811
"generate": "prisma generate",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
NODE_MAJOR=$(node -v | cut -c2- | cut -d. -f1)
4+
5+
if [ "$NODE_MAJOR" -lt "12" ]; then
6+
echo "Skipping Prisma tests on Node: $NODE_MAJOR"
7+
exit 0
8+
fi
9+
10+
yarn && yarn setup
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
import { assertSentryTransaction, getEnvelopeRequest, runServer } from '../../../utils';
1+
import { assertSentryTransaction, conditionalTest, getEnvelopeRequest, runServer } from '../../../utils';
22

3-
test('should instrument Prisma ORM client for tracing.', async () => {
4-
const url = await runServer(__dirname);
5-
const envelope = await getEnvelopeRequest(url);
3+
conditionalTest({ min: 12 })('Prisma ORM Integration', () => {
4+
test('should instrument Prisma client for tracing.', async () => {
5+
const url = await runServer(__dirname);
6+
const envelope = await getEnvelopeRequest(url);
67

7-
assertSentryTransaction(envelope[2], {
8-
transaction: 'Test Transaction',
9-
spans: [
10-
{ description: 'Action: create, Model: User', op: 'prisma' },
11-
{ description: 'Action: findMany, Model: User', op: 'prisma' },
12-
{ description: 'Action: deleteMany, Model: User', op: 'prisma' },
13-
],
8+
assertSentryTransaction(envelope[2], {
9+
transaction: 'Test Transaction',
10+
spans: [
11+
{ description: 'Action: create, Model: User', op: 'prisma' },
12+
{ description: 'Action: findMany, Model: User', op: 'prisma' },
13+
{ description: 'Action: deleteMany, Model: User', op: 'prisma' },
14+
],
15+
});
1416
});
1517
});

0 commit comments

Comments
 (0)