You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently request method in CollectionService has protected access modifier. This isn't causing any issues on its own but makes writing hacky unit tests for model services that use request.
Example of a real method in a service that extends CollectionService:
I would like to avoid as any, I can't think of any reason why this method would be protected as all other methods are public, and also the request method in IJsonapiCollection interface is public as well. TLDR: We should remove the access modifier on request method.
The text was updated successfully, but these errors were encountered:
Relevant version
Relevant libraries
Breaking change
No
Description
Currently
request
method inCollectionService
hasprotected
access modifier. This isn't causing any issues on its own but makes writing hacky unit tests for model services that userequest
.Example of a real method in a service that extends
CollectionService
:Since the
request
isprotected
it is not possible tospyOn
without casting and the tests look like this:I would like to avoid
as any
, I can't think of any reason why this method would beprotected
as all other methods arepublic
, and also therequest
method inIJsonapiCollection
interface ispublic
as well. TLDR: We should remove the access modifier onrequest
method.The text was updated successfully, but these errors were encountered: