Amazing job on testing and mocking.
I believe the function is depending on many variables, which can be avoided by breaking the tested function into smaller modules. and testing them one by one by isolating the function (if possible) and testing each function separately.
Testing with jest, part(1)
Amazing job on testing and mocking. I believe the function is depending on many variables, which can be avoided by breaking the tested function into smaller modules. and testing them one by one by isolating the function (if possible) and testing each function separately.
https://github.com/damdafayton/to-do-list/blob/7d1264c81edd9047bb7a81acdc7d887be6e1fb02/src/modules/addTask.js#L3-L17