mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-11-20 07:52:52 +08:00
22fbd14b3b
* test(parity): check six more frontend mirrors against the backend fixture These frontend copies were kept in step with Rust only by comments: providerNeedsRouting (tray::provider_needs_routing), WARN_BELOW_PERCENT, DISPLAY_CURRENCIES (TARGET_CURRENCIES), the custom icon prefix, length and size limits, APP_PROFILE_SCOPE (ProfileScope::for_app) and isValidUserAgentHeader (parse_custom_user_agent). The backend now writes their values into tests/config/backendConstants.json. For the two rules it writes the answers on sample inputs: 9 cards in each of the 5 tray apps and 12 User-Agent strings. The frontend test runs its own copy on the same inputs. tray's needs_routing_mirrors_the_frontend_rule restated the routing answers by hand; its cases are now fixture inputs, so it is deleted. icon.rs cited a frontend MAX_CUSTOM_ICON_DIMENSION that never existed; the frontend's OUTPUT_SIZE is exported and checked against the limit. * test(parity): compare display currencies with the backend as a set --------- Co-authored-by: Jason <farion1231@gmail.com>