Skip to content

Commit

Permalink
test(client): Reporoduction for #10642
Browse files Browse the repository at this point in the history
  • Loading branch information
SevInf committed Oct 19, 2022
1 parent f7bb466 commit 6561180
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions packages/client/tests/functional/fluent-api/tests.ts
Expand Up @@ -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({
Expand All @@ -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({
Expand Down

0 comments on commit 6561180

Please sign in to comment.