rsksmart / rwallet

The RSK Wallet is based on our rWallet open-source code-base, which will allow developers and organizations to use it to build their own apps.
https://developers.rsk.co/wallet/
GNU General Public License v3.0
43 stars 22 forks source link

Testing: Add Unit Test coverage to core functions #581

Open chrisli30 opened 4 years ago

chrisli30 commented 4 years ago

From Brendan:

I suggest that for starters, any parts of rWallet that are not UI - i.e. do not touch react or react-native APIs - let's follow this process:

  1. identify which parts fall into this category
  2. refactor to extract them into their own spearate files or dirs within the project (applies only where these parts are within the UI code)
  3. write tests targeting these parts
  4. modularise by refactoring to extract these parts into a separate module (applies only where these parts are not already in their own module)

We need:

  1. First to set up the framework for testing pure Javascript code. We can use Mocha.
  2. Add test cases to utils functions in src/common
bguiz commented 4 years ago

s/mocha/jest/

because: (1) more react-specific test helpers available (for future), and (2) built-in coverage