KeyringController icon indicating copy to clipboard operation
KeyringController copied to clipboard

Improve unit test coverage

Open Gudahtt opened this issue 3 years ago • 3 comments

We should strive for 100% unit test coverage, and to cover all input boundary conditions.

Gudahtt avatar Jan 24 '22 18:01 Gudahtt

Current coverage status: Screen Shot 2022-04-04 at 12 17 25 PM

@jpuri has an open PR that adds coverage for the controllers repo side instantiation and use of this class. But perhaps we should increase the coverage within this repo? cc @Gudahtt

adonesky1 avatar Apr 04 '22 17:04 adonesky1

Reopening this as coverage is not yet at 100%

Gudahtt avatar Dec 12 '22 16:12 Gudahtt

After the TS refactor the current code coverage is,

----------------------|---------|----------|---------|---------|----------------------------------------------------------------------------------------------
File                  | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                                                                            
----------------------|---------|----------|---------|---------|----------------------------------------------------------------------------------------------
All files             |   90.43 |    68.67 |   92.59 |    90.2 |                                                                                              
 KeyringController.ts |    89.3 |    67.09 |   95.83 |   89.18 | 285,305,391-397,421,449,473,493-499,522,542,562,601,606,678,761,819,825,863,891,906,939,1034 
 constants.ts         |     100 |      100 |     100 |     100 |                                                                                              
 index.ts             |     100 |      100 |      50 |     100 |                                                                                              
----------------------|---------|----------|---------|---------|----------------------------------------------------------------------------------------------

The code coverage needs to be increased to a 100% and to keep it at that level it's also needed to enable jest-it-up.

gantunesr avatar Apr 05 '23 16:04 gantunesr