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
Description of feature/enhancement
Currently, developers need to manually create spy objects that mock a service/component:
e.g.
Let's create a testing utility function that automatically creates these spy objects for us
Justification
This will improve the developer experience when writing tests, instead of having the developer having to repeat the mock object, they can simply call the function once to create the object for them.
An added benefit would be that the spy object created be typed instead of any, and our IDEs would be able to autocomplete the method name for us whenever we are accessing the spy method of an object.
The text was updated successfully, but these errors were encountered:
Description of feature/enhancement
Currently, developers need to manually create spy objects that mock a service/component:
e.g.
![image](https://private-user-images.githubusercontent.com/67156011/298856911-3d188d31-0903-4ab6-bb6c-2fe2685d7016.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyNjA0MjgsIm5iZiI6MTcyNDI2MDEyOCwicGF0aCI6Ii82NzE1NjAxMS8yOTg4NTY5MTEtM2QxODhkMzEtMDkwMy00YWI2LWJiNmMtMmZlMjY4NWQ3MDE2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIxVDE3MDg0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVhYWViYWM0MTEyNGNlZWIyYTZhNzI3MjI2ODAwY2IxN2YyMTRkOTdlY2MzMTI2OGY0ZWZkZWU0YmJlM2QyODYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ZpoSGZ9RSRGG_hu68CP1kzeMvIVDzf6MLkPRgzxW0es)
Let's create a testing utility function that automatically creates these spy objects for us
Justification
This will improve the developer experience when writing tests, instead of having the developer having to repeat the mock object, they can simply call the function once to create the object for them.
An added benefit would be that the spy object created be typed instead of
any
, and our IDEs would be able to autocomplete the method name for us whenever we are accessing the spy method of an object.The text was updated successfully, but these errors were encountered: