Skip to content

Commit

Permalink
Skip tests on Node v16
Browse files Browse the repository at this point in the history
  • Loading branch information
timokoessler committed Nov 29, 2024
1 parent 33f069c commit 31be3d0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions library/sinks/Prisma.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { createTestAgent } from "../helpers/createTestAgent";
import { promisify } from "util";
import { exec as execCb } from "child_process";
import * as path from "path";
import { getMajorNodeVersion } from "../helpers/getNodeVersion";

const execAsync = promisify(execCb);

Expand Down Expand Up @@ -40,7 +41,12 @@ const noSQLContext: Context = {
route: "/posts/:id",
};

t.test("it works with sqlite", async (t) => {
const testOpts = {
skip:
getMajorNodeVersion() < 18 ? "Prisma does not support Node.js < 18" : false,
};

t.test("it works with sqlite", testOpts, async (t) => {
const agent = createTestAgent();
agent.start([new Prisma()]);

Expand Down Expand Up @@ -145,7 +151,7 @@ t.test("it works with sqlite", async (t) => {
await client.$disconnect();
});

t.test("it works with postgres", async (t) => {
t.test("it works with postgres", testOpts, async (t) => {
const agent = createTestAgent();
agent.start([new Prisma()]);

Expand Down Expand Up @@ -244,7 +250,7 @@ t.test("it works with postgres", async (t) => {
await client.$disconnect();
});

t.test("it works with mongodb", async (t) => {
t.test("it works with mongodb", testOpts, async (t) => {
const agent = createTestAgent();
agent.start([new Prisma()]);

Expand Down

0 comments on commit 31be3d0

Please sign in to comment.