Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Jest Testing for useImperialConfig #991

Open
sebastianbarry opened this issue Sep 29, 2023 · 0 comments
Open

Add Jest Testing for useImperialConfig #991

sebastianbarry opened this issue Sep 29, 2023 · 0 comments
Assignees

Comments

@sebastianbarry
Copy link

Following the trend of e-mission/e-mission-phone#1033
Adding Jest testing for basic testing of pure functions:

Tested the pure functions in useImperialConfig.ts

  • getFormattedDistanceInKm
  • getFormattedDistanceInMiles
  • getKmph
  • getMph

Tested for:

  • Valid input = correct conversion
  • Empty input produces "0.0" or "NaN"
  • Invalid (non-numerical) input produces "NaN"

Completed PR in e-mission/e-mission-phone#1043

@sebastianbarry sebastianbarry self-assigned this Sep 29, 2023
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

No branches or pull requests

1 participant