Skip to content

test(prices): tweak tests#97

Open
Vombato wants to merge 5 commits into
mainfrom
test/fix-token-fiat-price-unit-cases
Open

test(prices): tweak tests#97
Vombato wants to merge 5 commits into
mainfrom
test/fix-token-fiat-price-unit-cases

Conversation

@Vombato
Copy link
Copy Markdown
Contributor

@Vombato Vombato commented May 6, 2026

Summary

  • keep unit coverage for unsupported token and fiat inputs in getTokenFiatPrice
  • strengthen assertions for error-path structuredContent fields (token, fiat, source, price)
  • verify error details include invalid_enum_value and the specific invalid value (btc / jpy)

Test plan

  • npx jest --config jest.config.js tests/prices/get-token-fiat-price.unit.test.ts --runInBand

Replace malformed unit tests that used unsupported token/fiat values with valid scenarios that verify GBP conversion and case-insensitive input normalization.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Vombato Vombato requested a review from a team as a code owner May 6, 2026 08:01
Keep explicit unit coverage for unsupported token and fiat values, asserting structured error payload content instead of replacing those scenarios.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Vombato Vombato changed the title test(prices): replace invalid fiat price unit cases test(prices): restore invalid input coverage May 6, 2026
Log schema validation failures as info to avoid warning noise for expected invalid inputs, while preserving warn level for operational oracle failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Vombato Vombato changed the title test(prices): restore invalid input coverage test(prices): tweak tests May 6, 2026
@Vombato Vombato enabled auto-merge (squash) May 6, 2026 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant