This commit is contained in:
Zai Shi 2025-08-01 10:43:17 -07:00
parent 95db583f97
commit f7b1d20ce8

View File

@ -222,11 +222,9 @@ import.meta.vitest?.test("applies migrations concurrently with 20 concurrent mig
const appliedCounts = results.map(result => result.newlyAppliedMigrationNames.length);
// Only one of the promises should have applied all migrations, the rest should have applied none
const successfulApplies = appliedCounts.filter(count => count === 2);
const emptyApplies = appliedCounts.filter(count => count === 0);
expect(successfulApplies.length).toBe(1);
expect(emptyApplies.length).toBe(19);
const appliedCounts = results.map(result => result.newlyAppliedMigrationNames.length);
const appliedSum = appliedCounts.reduce((sum, count) => sum + count, 0);
expect(appliedSum).toBe(2);
await prismaClient.$executeRaw`INSERT INTO test (name) VALUES ('test_value')`;
const result = await prismaClient.$queryRaw`SELECT name FROM test` as { name: string }[];