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

chore(suite-native): introduce component tests #16387

Merged
merged 1 commit into from
Jan 17, 2025
Merged

Conversation

jbazant
Copy link
Contributor

@jbazant jbazant commented Jan 15, 2025

Description

Reintroduction of testing-library to our code base.

  • updated test-utils module
  • updated jest.config.native.js
  • 2 "example" component tests introduced

@jbazant jbazant added the mobile Suite Lite issues and PRs label Jan 15, 2025
@jbazant jbazant requested a review from a team as a code owner January 15, 2025 11:13
Copy link

github-actions bot commented Jan 15, 2025

🚀 Expo preview is ready!

  • Project → trezor-suite-preview
  • Platforms → android, ios
  • Scheme → trezorsuitelite
  • Runtime Version → 22
  • More info

Learn more about 𝝠 Expo Github Action

@@ -0,0 +1,4 @@
const { ...baseConfig } = require('../../jest.config.native');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are trying to avoid unecessary boilerplate files for packages as much as possible so I would strongly prefer to just include config in package.json as it is for other packages aka test:unit: "yarn g:jest -c ../../jest.config.native.js"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If jest.config.js is specified, IDE is able to pick it up and use when running test. It is possible to run tests from IDE even without the explicit config, but it is required to define configuration, which is IMO a bit inconvenient.

I can definitely remove it, just sharing my reasoning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

@vytick vytick added the no-project This label is used to specify that PR doesn't need to be added to a project label Jan 17, 2025
@vytick vytick merged commit e456b64 into develop Jan 17, 2025
84 checks passed
@vytick vytick deleted the testing-library branch January 17, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mobile Suite Lite issues and PRs no-project This label is used to specify that PR doesn't need to be added to a project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants