Overloaded test suits
Last updated
Last updated
It is important not to add new unit tests if a test suite already exceeds a very high memory limit. It is optimal that the memory used by a test suit is within the range of 1500 mb to 1600 mb, this data can be verified in the terminal after executing the tests of some suite.
It is recommended to create and configure another spec.ts file in order to add new unit tests.
In order to get heap memory values on Jest, the logHeapUsage flag is used. This flag allows to log the memory values when running the unit tests. In addition, to look for memory leaks it runs along with runInBand flag. Here is an example of the instruction to run the unit tests:
These scripts are already located on package.json of each of the frameworks repositories.
If using Jest Runner --logHeapUsage flag can be added through settings. That can be found on Jest Runner section.