chore: cleanup tests#1153
Open
0xeye wants to merge 15 commits into
Open
Conversation
* feat: initial * feat: round two * feat: round three * chore: update CLAUDE.md * fix: price impact confirmation resets (#1124) Replace remembered confirmation keys with keyed resettable state in the deposit and withdraw widgets. This preserves the high-price-impact warning behavior without reintroducing a reset effect, so a user returning from quote B back to quote A must acknowledge the warning again. --------- Co-authored-by: rossgalloway <58150151+rossgalloway@users.noreply.github.com>
* fix warning not showing correctly (#1117) * fix TVL chart (#1118) * update strategy APY fallback behavior (#1119) * update modals for TGE (#1122) * update modals for TGE * update messaging * update modal language * Fix vault chain selection (#1123) Keep the vault list aligned with the selected chain filter and\nmake chain switching behave consistently across the page.\n\n- apply selected-chain filtering to holdings in both V2 and V3\n vault filters so other-chain rows do not leak into the list\n- reuse a single-chain selection helper for the top selector and\n row chips so switching chains cannot drift into mixed states\n- add focused tests for selected-chain matching and single-chain\n selection behavior * Fix reflected XSS in /api/vault/meta endpoint (#1129) Add strict allowlist validation for chainId and address query parameters before they are interpolated into HTML. chainId must be numeric and address must match the 0x-prefixed 40-char hex pattern, otherwise the request is rejected with a 400. This prevents attackers from breaking out of meta tag attribute contexts to inject arbitrary HTML/scripts. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Add strategy-level KAT rewards APR display (#1128) * Add strategy-level KAT rewards APR display - Schema: make estimated apr/apy optional (Kong hydration may set only apr for strategy-addressed rows), add katRewardsAPR component - Selector: fall back to estimated.apr for katana strategies when estimated.apy is missing, extract katRewardsAPR from estimated type - Strategy UI: show sword emoji indicator when strategy has KAT rewards - Tests: cover katana strategy APR fallback and non-katana isolation * fix: make KAT rewards additive on top of oracle APY with tooltip breakdown - Selector: estimatedAPY now always falls through to oracle.apy for Katana strategies instead of using estimated.apr (which is KAT rewards) - UI: strategy row shows combined APY (oracle + KAT rewards) - UI: hover tooltip breaks down Base APY and KAT Rewards APR - Tooltip follows existing pattern (rounded-lg border surface-secondary) - Tests updated to reflect additive behavior * fix: remove sword emoji from KAT rewards tooltip * style: fix biome formatting * fix kong selector --------- Co-authored-by: JuniorDevBot <juniordevbot@yearn.fi> Co-authored-by: Ross <therossgalloway@gmail.com> Co-authored-by: rossgalloway <58150151+rossgalloway@users.noreply.github.com> * init tenderly testnets * add tenderly control panel * create tenderly script * refine tenderly vnet script defaults * refine tenderly control panel state * simplify tenderly control panel * harden tenderly vnet script * fix simulate wrapper typing * fix cooldown to use block time * gate tenderly admin routes and validate config * use request IP for tenderly admin access * fix tenderly approval and ens config * fix tenderly loopback and env bootstrap * treat failed tenderly reverts as errors * fix tenderly chain identity mapping * fix tenderly snapshot reset and localhost forks * keep codex agent log local * update gitignore * separate canonical and execution chain lists * fix localhost aliasing and explorer defaults * keep canonical chains in wagmi config * preserve mainnet wagmi transport * fix tenderly execution boundary leaks * Fix locked yvUSD historical PPS and APY normalization (#1133) * update locked APY and PPS timeseries values to reflect actual conditions * review fix * Fix yvUSD historical PPS handling Preserve missing historical PPS values instead of collapsing them to zero.\n\n- Keep weekly and monthly PPS lookbacks nullable in Kong vault APR data\n- Reuse yvUSD chart-derived historical APY in portfolio blending\n- Align portfolio and chart history so partial snapshot PPS data does\n not produce bogus locked APY values * fix tenderly wagmi chain exposure * fix biome import ordering * update env.example --------- Co-authored-by: murderteeth <89237203+murderteeth@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: juniordevbot[bot] <170848020+juniordevbot[bot]@users.noreply.github.com> Co-authored-by: JuniorDevBot <juniordevbot@yearn.fi>
* add link to API * add docs link to more info
…pdates (#1132) Bumps the minor-updates group with 7 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@tanstack/react-query](https://github.com/TanStack/query/tree/HEAD/packages/react-query) | `5.90.21` | `5.95.0` | | [framer-motion](https://github.com/motiondivision/motion) | `12.34.0` | `12.38.0` | | [graphql](https://github.com/graphql/graphql-js) | `16.12.0` | `16.13.1` | | [viem](https://github.com/wevm/viem) | `2.46.1` | `2.47.6` | | [@tailwindcss/postcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-postcss) | `4.1.18` | `4.2.2` | | [lint-staged](https://github.com/lint-staged/lint-staged) | `16.2.7` | `16.4.0` | | [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) | `4.1.18` | `4.2.2` | Updates `@tanstack/react-query` from 5.90.21 to 5.95.0 - [Release notes](https://github.com/TanStack/query/releases) - [Changelog](https://github.com/TanStack/query/blob/main/packages/react-query/CHANGELOG.md) - [Commits](https://github.com/TanStack/query/commits/@tanstack/react-query@5.95.0/packages/react-query) Updates `framer-motion` from 12.34.0 to 12.38.0 - [Changelog](https://github.com/motiondivision/motion/blob/main/CHANGELOG.md) - [Commits](motiondivision/motion@v12.34.0...v12.38.0) Updates `graphql` from 16.12.0 to 16.13.1 - [Release notes](https://github.com/graphql/graphql-js/releases) - [Commits](graphql/graphql-js@v16.12.0...v16.13.1) Updates `viem` from 2.46.1 to 2.47.6 - [Release notes](https://github.com/wevm/viem/releases) - [Commits](https://github.com/wevm/viem/compare/viem@2.46.1...viem@2.47.6) Updates `@tailwindcss/postcss` from 4.1.18 to 4.2.2 - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.2.2/packages/@tailwindcss-postcss) Updates `lint-staged` from 16.2.7 to 16.4.0 - [Release notes](https://github.com/lint-staged/lint-staged/releases) - [Changelog](https://github.com/lint-staged/lint-staged/blob/main/CHANGELOG.md) - [Commits](lint-staged/lint-staged@v16.2.7...v16.4.0) Updates `tailwindcss` from 4.1.18 to 4.2.2 - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.2.2/packages/tailwindcss) --- updated-dependencies: - dependency-name: "@tanstack/react-query" dependency-version: 5.95.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-updates - dependency-name: framer-motion dependency-version: 12.38.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-updates - dependency-name: graphql dependency-version: 16.13.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-updates - dependency-name: viem dependency-version: 2.47.6 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-updates - dependency-name: "@tailwindcss/postcss" dependency-version: 4.2.2 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-updates - dependency-name: lint-staged dependency-version: 16.4.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-updates - dependency-name: tailwindcss dependency-version: 4.2.2 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-updates ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps-dev): bump @types/node from 20.19.10 to 25.3.0 * chore(deps-dev): update bun.lock for @types/node bump --------- Co-authored-by: Ross <therossgalloway@gmail.com>
KEEP (12 files) — real math/calculations: 1. strategiesPercentFormat.test.ts — percent rounding rules 2. format.test.ts — locale-aware currency formatting 3. vaultApy.test.ts — APY/APR compound interest math 4. useVaultApyData.test.ts — Katana APR computation 5. valuation.test.ts — deposit value, price impact % 6. cooldownUtils.test.ts — duration/time math 7. yvUsd.test.ts — weighted APY, PPS conversions, APR annualization, bigint math 8. useYvUsdCharts.helpers.test.ts — PPS series, APY derivation 9. YvUsdWithdraw.helpers.test.ts — share/asset bigint conversions 10. useYvUsdVaults.helpers.test.ts — TVL breakdown math 11. kongVaultSelectors.test.ts — pricePerShare conversion, APY selection 12. useVaultFilterUtils.test.ts — USD valuation from pricePerShare
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restructure tests to only keep what matters: math, calculations, and safety-critical logic where bugs silently cost user funds or break navigation. All tests now live in
src/test/, flat — no more 1:1 source tree mirroring.54 test files removed, 15 kept (115 tests, all with human-verifiable expected values).
Why these tests were removed
When AI writes both the implementation and the tests, it validates its own assumptions against itself. When the implementation changes, the tests get rewritten to match, so they never actually catch anything. The only tests worth keeping are ones where a human verified the expected values independently.
Specific categories dropped:
render,screen,@testing-library/react) — AI generates and updates these alongside the code, making them circularWhat is kept
15 test files in
src/test/:Math and calculations:
Safety-critical logic:
CLAUDE.md updated
Testing section now instructs: prioritise math, save to
src/test/, do not mirror source tree, do not test what AI will just adjust to match.