chore: snapshot before performance optimization
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
|
||||
import { PrismaClient } from '@prisma/client'
|
||||
import {
|
||||
setupTestEnvironment,
|
||||
createTestPrismaClient,
|
||||
initializeTestDatabase,
|
||||
cleanupTestDatabase,
|
||||
@@ -20,7 +19,6 @@ describe('Schema Migration Tests', () => {
|
||||
let prisma: PrismaClient
|
||||
|
||||
beforeAll(async () => {
|
||||
await setupTestEnvironment()
|
||||
prisma = createTestPrismaClient()
|
||||
await initializeTestDatabase(prisma)
|
||||
})
|
||||
@@ -294,7 +292,7 @@ describe('Schema Migration Tests', () => {
|
||||
|
||||
test('should have indexes on Note table', async () => {
|
||||
// Note table should have indexes on various columns
|
||||
const schema = await getTableSchema(prisma, 'sqlite_master')
|
||||
const schema = await getTableSchema(prisma, 'Note')
|
||||
expect(schema).toBeDefined()
|
||||
})
|
||||
})
|
||||
@@ -504,14 +502,11 @@ describe('Schema Migration Tests', () => {
|
||||
|
||||
describe('Schema Version Tracking', () => {
|
||||
test('should have all migrations applied', async () => {
|
||||
// Check that the migration tables exist
|
||||
const migrationsExist = await verifyTableExists(prisma, '_prisma_migrations')
|
||||
// In SQLite with Prisma, migrations are tracked via _prisma_migrations table
|
||||
// For this test, we just verify the schema is complete
|
||||
// Verify the schema is complete by checking core tables
|
||||
const hasUser = await verifyTableExists(prisma, 'User')
|
||||
const hasNote = await verifyTableExists(prisma, 'Note')
|
||||
const hasAiFeedback = await verifyTableExists(prisma, 'AiFeedback')
|
||||
|
||||
|
||||
expect(hasUser && hasNote && hasAiFeedback).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user