Skip to content

test(assets-controller): add record snapshots to v6 integration suites - #10490

Merged
Prithpal-Sooriya merged 36 commits into
mainfrom
test-v6-integration-snapshots
Sep 28, 2026
Merged

Prithpal-Sooriya merged 36 commits into
mainfrom
test-v6-integration-snapshots

Conversation

@Prithpal-Sooriya

@Prithpal-Sooriya Prithpal-Sooriya commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Explanation

Added pipeline/assets-state snapshots for our integration tests to ensure that we can have a "catch-all" for any future regressions 😄

With how complex our controller architecture is, I think snapshots will be a great way to ensure we capture changes.

This does mean that as Assets COs we should review snapshot changes to ensure we aren't introducing legit regressions.

Code Walkthrough:
https://www.loom.com/share/6587d42f75504b18967137a0968cb4fd

References

  • Test-only change (plus a test fixture helper); no production code touched, so the no-changelog label is applied per test-only convention.

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Test-only changes (fixture helper, integration tests, and snapshots); no production assets-controller logic is modified.

Overview
Adds Jest snapshot tests as a regression baseline for Accounts API v6 BSC spam-token (CDOGE) integration coverage.

A new test helper withZeroedTimestamps deep-clones state/response objects and sets every numeric lastUpdated field to 0 so snapshots stay stable across runs. Both the AssetsController integration suite and the buildFastFetchSources pipeline suite now include a "generates snapshot (source of truth)" case that asserts the full wallet outcome (balances, metadata, prices—and for the pipeline, detectedAssets and updateMode: 'full') after normalization. Committed .snap files record that expected shape; future changes to the v6 fast lane will show up as snapshot diffs for review.

Reviewed by Cursor Bugbot for commit 95bbf00. Bugbot is set up for automated code reviews on this repo. Configure here.

Kriys94 and others added 23 commits September 10, 2026 13:54
Resolve conflicts by adopting main's implementation changes from #9651
and #10469 (constructor-injected state/visibility, removal of the
unprocessedCustomAssets mechanism, full-chain RPC recovery on v6) while
keeping the PR's integration test coverage: the v5 suites keep their
existing structure, and the two new v6 suites are adapted to main's
data-source/pipeline API.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@Prithpal-Sooriya
Prithpal-Sooriya requested a review from a team as a code owner September 25, 2026 15:46
@Prithpal-Sooriya
Prithpal-Sooriya added this pull request to stack #10491 September 25, 2026 15:47
@Prithpal-Sooriya Prithpal-Sooriya changed the title test: add golden-record inline snapshots to v6 integration suites test(assets-controller): add integration test snapshots Sep 25, 2026
@Prithpal-Sooriya Prithpal-Sooriya changed the title test(assets-controller): add integration test snapshots test: add golden-record snapshots to v6 integration suites Sep 25, 2026
@Prithpal-Sooriya
Prithpal-Sooriya removed request for a team September 28, 2026 11:18
salimtb
salimtb previously approved these changes Sep 28, 2026
Base automatically changed from test-improve-v6-integration-tests to main September 28, 2026 14:28
@Prithpal-Sooriya
Prithpal-Sooriya dismissed salimtb’s stale review September 28, 2026 14:28

The base branch was changed.

…napshots-jqag49ts

# Conflicts:
#	packages/assets-controller/src/AssetsController.bsc-spam-token-filtering.accounts-api-v6.integration.test.ts
#	packages/assets-controller/src/pipeline/buildFastFetchSources.bsc-spam-token-filtering.accounts-api-v6.integration.test.ts
@Prithpal-Sooriya
Prithpal-Sooriya added this pull request to the merge queue Sep 28, 2026
Merged via the queue into main with commit 334abe5 Sep 28, 2026
52 checks passed
@Prithpal-Sooriya
Prithpal-Sooriya deleted the test-v6-integration-snapshots branch September 28, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants