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

Issue while testing - res.allLogs is not defined #361

Open
todor-a opened this issue Dec 9, 2024 · 2 comments · May be fixed by #362
Open

Issue while testing - res.allLogs is not defined #361

todor-a opened this issue Dec 9, 2024 · 2 comments · May be fixed by #362

Comments

@todor-a
Copy link

todor-a commented Dec 9, 2024

I've encountered an issue while using jest-mock-extended - the issue is that when you create a response like this:

const response = mock<Response>();

This instantiates allLogs as a mocked function and this check passes.

Does it make sense to change this line to !Array.isArray(allLogs)? Would be happy to submit a PR.

@mcollina
Copy link
Member

mcollina commented Dec 9, 2024

Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.

@todor-a
Copy link
Author

todor-a commented Dec 9, 2024

Will do.

@todor-a todor-a linked a pull request Dec 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants