test: add coverage for storage-entry-schemas.ts narrow validation by EmaToplek · Pull Request #30184 · prisma/orm · GitHub
Skip to content

test: add coverage for storage-entry-schemas.ts narrow validation - #30184

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

test: add coverage for storage-entry-schemas.ts narrow validation#30184
EmaToplek wants to merge 1 commit into
prisma:mainfrom
EmaToplek:test/contract-entry-schemas-coverage

Conversation

@EmaToplek

@EmaToplek EmaToplek commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds test coverage for the .narrow() validation callback on StorageColumnSchema in packages/2-sql/1-core/contract/src/ir/storage-entry-schemas.ts, covering:

  • the typeParams/typeRef mutual-exclusivity check

  • the noCheck array non-empty requirement

  • the noCheck sorted/unique-ascending requirement

  • storage-entry-schemas.ts: 100% statements/branches/functions/lines (up from 73%/38%/100%/76%)

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

Summary by CodeRabbit

  • Tests
    • Added coverage for validating SQL storage column definitions.
    • Confirmed valid configurations using type parameters, type references, and properly ordered unique exemptions.
    • Added checks that reject conflicting type fields, empty exemption lists, unsorted values, and duplicates.

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

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

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