Open jeremy-jtlo opened 2 years ago
I'm going to try and work on some of these one by one (focusing on abilities since that's my end-to-end feature) and create Pull Requests, we should discuss any other possible tests that should be create before we consider merging the pull requests
Crap, I just realized there are pokemon repository improvements I want to make.
Those may block the repo tests at the very least.
You can make a new issue for that and then add tests to it to verify that it works
Noticed while approving PRs last night that we don't have any tests for the following files:
AbilityService.ts#84AbilityFactory.ts#85AbilityRepository.ts#82Considering how core they are to our data pipeline, maybe we should at least have a couple quick sanity checks on them to ensure future changes don't break the app.
Services are guarantors of data consumed by views. The views will always trust that something coming from the service is valid and up-to-date, so we should be validating that.
Repositories are simple CRUD objects, but services need to make sure that what was placed in there has a valid expiry that can be relied on.
Factories do the work of hammering raw payloads into the shape our app can recognize. They need to be tested.