department-of-veterans-affairs / va-mobile-app

"If VA were a company, it would have a flagship mobile app."
https://department-of-veterans-affairs.github.io/va-mobile-app/
15 stars 2 forks source link

chore/5743-Setupi18nInUnitTests #9702

Open alexandec opened 3 days ago

alexandec commented 3 days ago

Description of Change

Since the I18nextProvider is already set up in our unit test render function, we are good to use the t() function in our unit tests. I switched over 3 unit test files in this PR as a POC. We can do the rest as time allows.

I updated the unit test documentation with a new section on using translations in unit tests. I also updated all the examples in the docs appropriately.

Screenshots/Video

Testing

Reviewer Validations

PR Checklist

Reviewer: Confirm the items below as you review

For QA

Run a build for this branch

alexandec commented 2 days ago

@theodur thanks!