Page MenuHomePhabricator

[Cashtab] Migrate Airdrop component tests to ts
ClosedPublic

Authored by bytesofman on Jul 8 2025, 21:13.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Commits
rABC7ce90ccbfe0a: [Cashtab] Migrate Airdrop component tests to ts
Summary

Continue Cashtab test migration from js to ts.

In this migration, we discover that the tokenMocks param of the helper function prepareMocks is not configured to accept custom tokens that a test may need. We make this adjustment to support this (and future) conversions.

We also make other type-related corrections to mocks that were related to this test (expected benefit of continued typescript conversion).

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bytesofman published this revision for review.Jul 8 2025, 22:00
emack added a subscriber: emack.
emack added inline comments.
cashtab/src/chronik/fixtures/mocks.js
14827 ↗(On Diff #54749)

this didn't break the tests before?

This revision is now accepted and ready to land.Jul 9 2025, 04:15
bytesofman added inline comments.
cashtab/src/chronik/fixtures/mocks.js
14827 ↗(On Diff #54749)

the tests don't really use this value. since the other tests that use this mock are not in ts, they weren't bothered by the mocks not being the right type.

This revision was automatically updated to reflect the committed changes.
bytesofman marked an inline comment as done.