Skip to content

chore: fix tests typecheck - #637

Merged
Brentlok merged 1 commit into
mainfrom
fix/tests-typecheck
Aug 20, 2026
Merged

chore: fix tests typecheck#637
Brentlok merged 1 commit into
mainfrom
fix/tests-typecheck

Conversation

@Brentlok

@Brentlok Brentlok commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes
    • Improved resolver handling by validating resolution results before accessing file information.
    • Added clearer errors for unsupported resolution types.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 33774e2e-9d23-4ef8-b55e-745bcb22305b

📥 Commits

Reviewing files that changed from the base of the PR and between 20b1d37 and dcf77b2.

📒 Files selected for processing (1)
  • packages/uniwind/tests/native/bundler/resolvers.test.ts

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


📝 Walkthrough

Walkthrough

Changes

Resolver validation

Layer / File(s) Summary
Source file result check
packages/uniwind/tests/native/bundler/resolvers.test.ts
The test verifies that nativeResolver returns a sourceFile result before accessing filePath. It throws an error for other resolution types.

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

Merge Risk: ⚪ Minimal · up to dcf77

This is a localized test-only change, and no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: joedeleeuw

🚥 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 identifies the main change: fixing a test typecheck issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/tests-typecheck

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.

❤️ Share

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

@greptile-apps

greptile-apps Bot commented Aug 20, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes test type-checking by explicitly narrowing Metro’s resolution union before accessing filePath.

  • Adds a runtime discriminant guard requiring the expected sourceFile resolution.
  • Preserves the existing resolver behavior and assertion.

Confidence Score: 5/5

The PR appears safe to merge with no actionable issues identified.

The added guard narrows the resolution union to the variant already guaranteed by the test fixture before accessing its file path.

Important Files Changed

Filename Overview
packages/uniwind/tests/native/bundler/resolvers.test.ts Adds a valid type-narrowing guard consistent with the deterministic source-file resolution returned by the test fixture.

Reviews (1): Last reviewed commit: "chore: fix tests typecheck" | Re-trigger Greptile

@Brentlok
Brentlok merged commit 0f8bdcd into main Aug 20, 2026
3 checks passed
@Brentlok
Brentlok deleted the fix/tests-typecheck branch August 20, 2026 07:17
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