test(app): replace unsafe mock assertions with shoehorn - #2980
Conversation
|
|
@k4its1t is attempting to deploy a commit to the HyperDX Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @k4its1t, thanks for the pull request! Before we review code from a first-time contributor we ask that a maintainer vouches for you, and you're not on our list yet. This PR stays open — it just isn't in the review queue until someone vouches. To get vouched, open an issue saying hello and what you're working on: https://github.com/hyperdxio/hyperdx/issues/new?template=introduce-yourself.md A maintainer will usually reply within a day or two, and then this PR gets picked up as normal. More detail in our contributing guide. |
Greptile SummaryThe PR replaces unsafe test assertions with typed
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| packages/app/src/components/tests/DBRowSidePanel.viewTraceTimeFilter.test.tsx | Replaces asserted source fixtures with typed partial fixtures and enum-backed source kinds without changing tested behavior. |
| packages/app/src/components/tests/DBTimeChart.test.tsx | Converts hook result fixtures to typed partials and replaces the raw display-type assertion with an enum member. |
| packages/app/src/components/tests/MetricTableModelForm.test.tsx | Uses typed metric-source fixtures and explicitly removes metric-table state when constructing the switched-kind fixture. |
| packages/app/package.json | Adds the test-only shoehorn package as an app development dependency. |
| scripts/ci/ratchet-baseline.json | Reduces app baselines to match the removed unsafe assertions and ESLint disables. |
| yarn.lock | Records the new shoehorn dependency and complete resolved package entry. |
Reviews (4): Last reviewed commit: "test(app): apply typed fixture review fe..." | Re-trigger Greptile
Deep Review✅ No critical issues found. This is a clean, well-scoped test-only refactor. Six reviewers independently confirmed no correctness, type-safety, standards, or coverage regressions. Key facts were verified against the repo:
🔵 P3 nitpicks (1)
Reviewers (6): correctness, testing, maintainability, project-standards, kieran-typescript, previous-comments. |
|
/vouch @pttydou wants to improve FE type safety |
Triggered by [comment](#2980 (comment)) from @jordan-simonovski. Vouch: @pttydou
Summary
@total-typescript/shoehornas an app test dependencyfromPartialfixturesas anyoccurrences and from 144 to 141 ESLint disablesHow to test on Vercel preview
N/A — non-UI test maintenance change.
Validation
make ci-lintlint-stagedandknip --no-config-hintsmake ci-unit: the app run hit four failures in an unrelatedDBEditTimeChartFormsuite under full parallel load; that suite passed 34/34 immediately when rerun in isolationReferences
as anymock fixtures in three app test files with shoehorn #2852main)Implemented with Codex assistance.