Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

add setup

Kiran K26870bd25877
diff --git a/apps/web/tests/setup.ts b/apps/web/tests/setup.ts
new file mode 100644
index 0000000000..a7d9440473
--- /dev/null
+++ b/apps/web/tests/setup.ts
@@ -0,0 +1,25 @@
+
+import prisma from "@/lib/prisma";
+import { afterAll, beforeAll } from "vitest";
+
+beforeAll(async () => {
+ console.log("Running beforeAll")
+
+ // await prisma.user.create({
+ // data: {
+ // name: "Kiran",
+ // email: "[email protected]",
+ // emailVerified: new Date(),
+ // },
+ // });
+
+ // Create a user
+ // Create a workspace
+ // Create a api key
+});
+
+afterAll(async () => {
+ console.log("Running afterAll")
+ await prisma.$transaction([prisma.project.deleteMany()]);
+ await prisma.$transaction([prisma.user.deleteMany()]);
+})
\ No newline at end of file