KeyringController
KeyringController copied to clipboard
Improve unit test coverage
We should strive for 100% unit test coverage, and to cover all input boundary conditions.
Current coverage status:

@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
Reopening this as coverage is not yet at 100%
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.