We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We could add the possibility to set type for body content of response.
For example for this example mock:
const getUsersMock = mockiavelli.mockGET('/api/users', { status: 200, body: [ { id: 123, name: 'John Doe' }, { id: 456, name: 'Mary Jane' }, ], });
programmer would set type of body content:
const getUsersMock = mockiavelli.mockGET<User[]>('/api/users', { status: 200, body: [ { id: 123, name: 'John Doe' }, { id: 456, name: 'Mary Jane' }, ], });
It will help find some changes in interfaces and fast fix changes in mocked responses.
Of course generic parameter will be optional.
The text was updated successfully, but these errors were encountered:
feat: add generic type for mocked response body to mock methods (HLTe…
64b3d69
…ch#18) resolve HLTech#18
ab0cd70
08c6a78
feat: add generic type for mocked response body to mock methods (#18)
2c1fc5d
resolve #18
🎉 This issue has been resolved in version 1.1.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
Sorry, something went wrong.
Fiszcz
Successfully merging a pull request may close this issue.
We could add the possibility to set type for body content of response.
For example for this example mock:
programmer would set type of body content:
It will help find some changes in interfaces and fast fix changes in mocked responses.
Of course generic parameter will be optional.
The text was updated successfully, but these errors were encountered: