-
Epic
-
Resolution: Done
-
Normal
-
None
-
None
-
Determine gaps in unit test coverage
-
False
-
-
False
-
Done
-
0% To Do, 0% In Progress, 100% Done
Description
As a developer, I want to add/modify unit tests for files that have very low line coverage(under 20%) so that I can gain confidence when modifying the code base.
Acceptance criteria
- When running the full unit test suite, all (*.js, *.ts, *.tsx, *.js)) application files (inside the "src" directory) will have at least 20% line coverage except for the files listed in the "Out of scope"section.
- Each modified/added unit test will have assertions (aka expects) that test for items/changes
- For example a new test suite cannot only render the component or only test for accessibility
- Each component that was modified as part of this work will have at least 75% test line coverage
Out of scope
Any feature additions or modifications.
Any other code modifications, including other tech-debt items like converting to Typescript, converting to functional components, converting to React Query, etc.
Certain files cannot be fully unit tested or contain very little logic so they do not need to be tested. The following files do not need to meet the 20% coverage list:
- /src/bootstrap.ts
- /src/chrome-main.tsx
- /src/i18n.ts /src/main.tsx
- /src/components/App/App.tsx
- and index.* file
Testing implications
Since there will be little to no modification of the comments themselves, there will be very little (if component files needed to be modified in order to be tested) or no (only unit test files were modified) testing beyond the automated unit testing will be needed.
------------------------------------------------------------------------------------------------------------------------
Implementation notes
List of files that do not meet 20% line coverage: unitTestCoverage.txt (note that this may be out of date). Approximately 56 files.
Any files that have little coverage but are not used by the application can be deleted.
- is depended on by
-
OCMUI-3115 Unit test enhance coverage and quality
-
- Closed
-