Closed kghalamb closed 1 year ago
I also found a typo in module-services.js where the user list was typed as "member_list" which I fixed, but someone should review that change in case it was not actually a typo after all.
Looks like a good starting template for testing. Will be nice to have the files and baseline code going forward.
Looks good, we will need to add more cases later, but that will be easy with this already implemented
Good progress so far on testing! A note on your tests: the error seems to be when your comparing equality, you don't seem to be adding any objects into the collection, so that's why you get an undefined value when you try to extract an attribute from an object. The colllection is empty, so trying to find something in that collection results in undefined, leading to the error.
To fix this issue, you can either add a new object into the database from the cloud and/or application (when running both the frontend and the backend), or add it within your testing suite, just remember to clear the database after you compare.
I am going to do a merge and try to apply @ayang101 's edits later. I think it is good to have some foundations when it comes to testing for future use.
Added some tests, but they don't work due to some unidentified jest errors.