test(client): push item/items to scalar list#29206
Conversation
WalkthroughAdds a new functional test suite for scalar-list-push: a test matrix targeting PostgreSQL, a Prisma schema generator producing a User model with a String[] field, and tests that validate pushing single and array values into the scalar list with appropriate database skips. Changes
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR adds test coverage for scalar list push operations in response to issue #29200, which reported fatal errors when pushing multiple items to scalar lists in Prisma 7. The test suite validates both single element and array push operations on String[] fields, similar to the existing json-list-push test but using scalar arrays instead.
Changes:
- Added test cases for scalar list push with single element and array values
- Created Prisma schema with String[] field for testing scalar list operations
- Configured test matrix to run only on PostgreSQL (where scalar lists are supported)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/client/tests/functional/scalar-list-push/tests.ts | Test suite with two test cases validating push operations on scalar String[] fields |
| packages/client/tests/functional/scalar-list-push/prisma/_schema.ts | Schema definition with User model containing String[] content field |
| packages/client/tests/functional/scalar-list-push/_matrix.ts | Test matrix configuration limiting tests to PostgreSQL provider |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Closing since the linked issue has been closed |
Related to issue #29200 and #29212
Same as json test but uses
TEXT[]insteadDocs: https://www.prisma.io/docs/orm/prisma-client/special-fields-and-types/working-with-scalar-lists-arrays#adding-items-to-a-scalar-list
Summary by CodeRabbit