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

docs(guide): fix expect assertion example in guide for spyOn #5294

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

winghouchan
Copy link
Contributor

What does this PR do?

Fixes example with spyOn and assertions. The example failed because the spied function would be called once but the expectation asserted 0 calls.

  • Documentation or TypeScript types (it's okay to leave the rest blank in this case)
  • Code changes

How did you verify your code works?

  1. Create test file with example.
  2. Run bun test.

Example test should now pass.

Fixes example with `spyOn` and assertions. The example failed because the spied function would be called once but the expectation asserted 0 calls.
Copy link
Contributor

@Electroid Electroid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, thanks!

@Electroid Electroid merged commit 1c570b4 into oven-sh:main Sep 13, 2023
@winghouchan winghouchan deleted the fix-spy-on-doc-typo branch September 13, 2023 22:57
paperdave pushed a commit to SuperAuguste/bun that referenced this pull request Sep 18, 2023
…sh#5294)

Fixes example with `spyOn` and assertions. The example failed because the spied function would be called once but the expectation asserted 0 calls.
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 this pull request may close these issues.

2 participants