We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5e452c commit 7c83f7cCopy full SHA for 7c83f7c
tests/e2e/orm/client-api/slicing.test.ts
@@ -505,7 +505,9 @@ describe('Query slicing tests', () => {
505
});
506
507
expect(user.posts).toHaveLength(2);
508
- expect(user.posts[0]!.title).toBe('Post 1');
+ expect(user.posts).toEqual(
509
+ expect.arrayContaining([expect.objectContaining({ title: 'Post 1' })])
510
+ );
511
512
513
it('allows nested update on included models', async () => {
@@ -545,7 +547,8 @@ describe('Query slicing tests', () => {
545
547
include: { posts: true },
546
548
549
- expect(updated.posts[0]!.title).toBe('Updated Post');
550
+ const updatedPost = updated.posts.find((p) => p.id === postId);
551
+ expect(updatedPost!.title).toBe('Updated Post');
552
553
554
0 commit comments