Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cypress/e2e/ui-tests.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { NotesPage } from "../pages/notes_page";
/**
* Comprehensive Deez Notes Application Testing Suite
*/
describe("Deez Notes Application", () => {
describe("Deez Notes Application Tests", () => {
const notesPage = new NotesPage();

beforeEach(() => {
Expand Down
1 change: 1 addition & 0 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import "./commands";

// Import type declarations for TypeScript support
/// <reference types="cypress" />
/// <reference path="./commands.d.ts" />

beforeEach(() => {
Expand Down
16 changes: 16 additions & 0 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"isolatedModules": false,
"types": ["cypress", "node"],
"noEmit": true,
"esModuleInterop": true,
"moduleResolution": "node",
"resolveJsonModule": true
},
"include": [
"**/*.ts",
"**/*.tsx"
],
"exclude": []
}
6 changes: 3 additions & 3 deletions prisma.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { defineConfig } from 'prisma/config'
import { defineConfig } from "prisma/config"

export default defineConfig({
datasource: {
url: process.env.DATABASE_URL!
}
})
},
});
18 changes: 10 additions & 8 deletions src/db/prisma.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
// lib/prisma.ts
import { PrismaClient } from "./client";
import { PrismaPg } from '@prisma/adapter-pg'
import { Pool } from 'pg'
import { PrismaClient } from "./client"
import { PrismaPg } from "@prisma/adapter-pg"
import { Pool } from "pg"

const globalForPrisma = global as unknown as { prisma: PrismaClient };
const globalForPrisma = global as unknown as { prisma: PrismaClient }

const pool = new Pool({ connectionString: process.env.DATABASE_URL })
const adapter = new PrismaPg(pool)

export const prisma = globalForPrisma.prisma || new PrismaClient({
adapter
});
export const prisma =
globalForPrisma.prisma ||
new PrismaClient({
adapter,
});

if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;
if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma
Loading