Skip to content
New issue

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

Typing and Doc do not match #381

Closed
Sufiane opened this issue Oct 15, 2024 · 2 comments · Fixed by #387
Closed

Typing and Doc do not match #381

Sufiane opened this issue Oct 15, 2024 · 2 comments · Fixed by #387
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@Sufiane
Copy link

Sufiane commented Oct 15, 2024

Describe the bug
When adding multiple interactions to the same endpoint using the onCall property of the response object we are obliged to add a status to the upperscope of the request. It's firstly counterintuitive and secondly not stated in the documentation (link)

Screenshot 2024-10-15 at 11 34 27

To Reproduce
Steps to reproduce the behavior:

  1. Add a mock with consecutive calls
  2. stick to the documentation code
  3. see the typescript compiler crying

Expected behavior
A different type for onCall behavior that do not need an upper scope status property.
Something that match the documentation

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot 2024-10-15 at 11 35 58

Software (please complete the following information):

  • OS: [e.g. Windows] Mac os
  • NodeJS Version [e.g. 14] 20.15
  • Test Runner [e.g mocha] Jest 29.7

Additional context
Add any other context about the problem here.

@ASaiAnudeep ASaiAnudeep added the documentation Improvements or additions to documentation label Oct 15, 2024
@ASaiAnudeep
Copy link
Member

@leelaprasadv is the PR ready for this?

@leelaprasadv
Copy link
Member

@ASaiAnudeep aah, I totally forgot about this. I should have the changes stashed away in a branch. Let me check that and raise a PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants