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
In sta, generated Api class is using arrow function
when compile to js, the code will be like this
which has an empty prototype, will unable to modify prototype of Api class for testing or monkey patching.
For example, i am writing unit testing, I am not able to use jest.spyOn(api.prototype,'someApi') as it will throw no property on prototype, but have to mock import to replace entire class import like
Current
In sta, generated Api class is using arrow function
when compile to js, the code will be like this
which has an empty prototype, will unable to modify prototype of Api class for testing or monkey patching.
For example, i am writing unit testing, I am not able to use
jest.spyOn(api.prototype,'someApi')
as it will throw no property on prototype, but have to mock import to replace entire class import likeExpected
Using function expression in class, for example
compiled to
which have a modifiable prototype
The text was updated successfully, but these errors were encountered: