Skip to content

test: add coverage for StorageColumn optional fields and from() - #30352

Open
EmaToplek wants to merge 1 commit into
prisma:mainfrom
EmaToplek:test/contract-storage-column-coverage
Open

EmaToplek wants to merge 1 commit into
prisma:mainfrom
EmaToplek:test/contract-storage-column-coverage

Conversation

@EmaToplek

@EmaToplek EmaToplek commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds test coverage for StorageColumn's optional fields (noCheck, typeParams, typeRef) and the static from() factory's pass-through vs. construct branches, in packages/2-sql/1-core/contract/src/ir/storage-column.ts.

  • storage-column.ts: 100% statements/branches/functions/lines (up from 85%/81%/100%/100%)

Related to the M9 target-extensible-IR coverage gap noted in coverage.config.json (TML-2521).

Summary by CodeRabbit

  • Tests
    • Expanded automated coverage for storage column configuration, including optional validation, type parameter, and type reference settings.
    • Added coverage confirming omitted optional values remain unset.
    • Added verification that storage columns can be created from plain input and that existing instances are preserved when passed through the conversion utility.
    • Existing tests for collection handling, round-tripping, and validation remain covered.

Signed-off-by: EmaToplek <toplek.ema0213@outlook.com>
@EmaToplek
EmaToplek requested a review from a team as a code owner September 18, 2026 21:04
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: prisma/orm/.coderabbit.yml

Review profile: CHILL

Plan: Advanced

Run ID: 21d98dbd-ce18-47fd-acbc-ed32bec4ace7

📥 Commits

Reviewing files that changed from the base of the PR and between ad23f6f and 319d0c4.

📒 Files selected for processing (1)
  • packages/2-sql/1-core/contract/test/storage-column-many.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The test file adds coverage for optional StorageColumn fields and the static StorageColumn.from constructor. Existing tests remain unchanged.

Changes

StorageColumn contract tests

Layer / File(s) Summary
Optional fields and from construction tests
packages/2-sql/1-core/contract/test/storage-column-many.test.ts
Tests verify that noCheck, typeParams, and typeRef are set when provided and undefined when omitted. Tests also verify construction from plain input and pass-through of existing instances.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested reviewers: wmadden-electric

Merge Risk: ⚪ Minimal · up to 319d0

This test-only change introduces no identified production or deployment risk and is mergeable.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the added test coverage for StorageColumn optional fields and the from() factory.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant