audius-client icon indicating copy to clipboard operation
audius-client copied to clipboard

Configure Jest for mobile testing

Open sliptype opened this issue 1 year ago • 3 comments

Description

image

  • Configure Jest to run successfully for the mobile app
  • Use babel to compile typescript instead of ts-jest which wasn't working due to Flow files with .js extensions in the react-native codebase

    The drawback to this is that our tests won't be typechecked when run

  • Add babel plugin to transform react-use imports so that browser env specific hooks aren't imported

Coming next:

  • Test for the NavigationContainer linking config

Dragons

Added process.env checks to determine if running via Jest. Will confirm that doesn't break anything in non-test envs

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration.

How will this change be monitored?

For features that are critical or could fail silently please describe the monitoring/alerting being added.

Feature Flags

Are all new features properly feature flagged? Describe added feature flags.

sliptype avatar Apr 10 '23 22:04 sliptype

It looks like there may be some changes to native mobile code, which requires triggering a full app release. Please follow the instructions here: https://www.notion.so/audiusproject/When-to-bump-app-version-2644a8f772364a4d91f44abcba44ce0b?pvs=4. cc @nicoback2 @sliptype

audius-infra avatar Apr 10 '23 22:04 audius-infra

It looks like there may be some changes to native mobile code, which requires triggering a full app release. Please follow the instructions here: https://www.notion.so/audiusproject/When-to-bump-app-version-2644a8f772364a4d91f44abcba44ce0b?pvs=4. cc @nicoback2 @sliptype

audius-infra avatar Apr 11 '23 14:04 audius-infra

It looks like there may be some changes to native mobile code, which requires triggering a full app release. Please follow the instructions here: https://www.notion.so/audiusproject/When-to-bump-app-version-2644a8f772364a4d91f44abcba44ce0b?pvs=4. cc @nicoback2 @sliptype

audius-infra avatar Apr 11 '23 17:04 audius-infra