Skip to content

test: add coverage for isStorageValueSet type guard - #30246

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

test: add coverage for isStorageValueSet type guard#30246
EmaToplek wants to merge 1 commit into
prisma:mainfrom
EmaToplek:test/contract-storage-value-set-coverage

Conversation

@EmaToplek

@EmaToplek EmaToplek commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds test coverage for the isStorageValueSet runtime type guard in packages/2-sql/1-core/contract/src/ir/storage-value-set.ts.

  • storage-value-set.ts: 100% statements/branches/functions/lines (up from 57%/0%/50%/67%)

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

Summary by CodeRabbit

  • Tests
    • Added coverage for recognizing valid storage value sets, including compatible plain objects.
    • Added checks ensuring invalid, incomplete, or incorrectly typed values are rejected.

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

coderabbitai Bot commented Sep 10, 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: Path: .coderabbit.yml

Review profile: CHILL

Plan: Advanced

Run ID: 511763c8-228a-4bb0-b1fe-cbf0d768a569

📥 Commits

Reviewing files that changed from the base of the PR and between f889eeb and 197f85a.

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

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


📝 Walkthrough

Walkthrough

The pull request extends storage-value-set.test.ts with coverage for the isStorageValueSet type guard.

Changes

Storage value set guard

Layer / File(s) Summary
Type guard test coverage
packages/2-sql/1-core/contract/test/storage-value-set.test.ts
The tests import isStorageValueSet and verify valid instances, duck-typed objects, primitives, missing fields, and incorrect kind values.

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

Suggested reviewers: wmadden-electric

Merge Risk: ⚪ Minimal · up to 197f8

This change adds coverage for storage value-set guard behavior without changing runtime behavior. No current merge-blocking risk remains.

🚥 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 main change: adding test coverage for the isStorageValueSet type guard.
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 PR with unit tests

Warning

Some tools did not complete. Review the errors below.

🔧 Biome (2.5.10)
packages/2-sql/1-core/contract/test/storage-value-set.test.ts

Biome could not lint this file: nested root configuration. Check the repository's Biome configuration and plugins.


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