Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
react-native-testing-library
🦉 Simple and complete React Native testing utilities that encourage good testing practices.
In this article, I presented a few simple examples of things that can cause performance problems in the long run. As you've noticed, minor refactoring led to a 93.1% performance improvement. Even though performance issues presented in the article can be caught during a thorough PR review, that can become inherently harder in complex codebases and as your React Native app grows. Making Reassure part of your test suite to address potential performance regressions and automate things in CI would greatly benefit you in the long run. Also, if you already write tests with react-native-testing-library (If you don't, you definitely should), creating Reassure perf tests is, to some degree, a copy-paste of existing tests with slight modification so that it can be quickly introduced into the development workflow. Due to the open-source nature of Reassure, if you have improvement suggestions, feel free to create issues in the repo, and Reassure team will address them.
Note: For the sake of simplicity in this particular example, we use jest.mock to mock our API results. Yet, it's advised to use msw to mock Api call results, which you can read more about here
Introducing a new tool means introducing a new workflow. This can lead to lower adoption, as developers need to to get familiar with it in the first place. To prevent that from happening, we've based Reassure on https://callstack.github.io/react-native-testing-library/ API as something React Native developers should be familiar with.
Related posts
- Unit Testing Expo Apps With Jest
- Has anyone automated storybook for visual regression tests with loki.js?
- Unit Tests using jest and react-native-testing-library.
- Is there a way to automatically find UI related/CSS bugs, something that works like unit testing but it's UI?
- Visual regression tests for Storybook with Loki