diff --git a/packages/client/tests/functional/fluent-api/tests.ts b/packages/client/tests/functional/fluent-api/tests.ts index f2d350ee4f2a..d2cf8823b633 100644 --- a/packages/client/tests/functional/fluent-api/tests.ts +++ b/packages/client/tests/functional/fluent-api/tests.ts @@ -149,6 +149,19 @@ testMatrix.setupTestSuite(() => { expect(posts).toEqual([expect.objectContaining({ title })]) }) + // https://github.com/prisma/prisma/issues/10642 + test.failing('findFirstOrThrow where nested entity is not found', async () => { + const property = await prisma.user + .findFirstOrThrow({ + where: { + email, + }, + }) + .property() + + expect(property).toBeNull() + }) + test('findUniqueOrThrow', async () => { const posts = await prisma.user .findUniqueOrThrow({ @@ -161,6 +174,19 @@ testMatrix.setupTestSuite(() => { expect(posts).toEqual([expect.objectContaining({ title })]) }) + // https://github.com/prisma/prisma/issues/10642 + test.failing('findUniqueOrThrow where nested entity is not found', async () => { + const property = await prisma.user + .findUniqueOrThrow({ + where: { + email, + }, + }) + .property() + + expect(property).toBeNull() + }) + test('create', async () => { const posts = await prisma.user .create({