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: fix an example code for mouse click #2043

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

ydah
Copy link

@ydah ydah commented Dec 14, 2022

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

If adding a new feature, the PR's description includes:

  • [-] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:
This PR is fix an example code for mouse click.
The following error occurred when writing the test code as shown in the example.

TypeError: Cannot read properties of undefined (reading 'have')
:
     42|
     43|       spy.should.have.been.calledWith('yes')
       |                 ^
     44|     })
     45|   })

@netlify
Copy link

netlify bot commented Dec 14, 2022

Deploy Preview for vue-test-utils-v1 failed.

Name Link
🔨 Latest commit 48ed8dc
🔍 Latest deploy log https://app.netlify.com/sites/vue-test-utils-v1/deploys/63998bb7e3d8120008584c1b

This PR is fix an example code for mouse click.
The following error occurred when writing the test code as shown in the example.

```console
TypeError: Cannot read properties of undefined (reading 'have')
:
     42|
     43|       spy.should.have.been.calledWith('yes')
       |                 ^
     44|     })
     45|   })
```
@ydah ydah changed the title docs: Fix an example code for mouse click docs: fix an example code for mouse click Dec 14, 2022
Copy link
Member

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

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

thanks!

@lmiller1990
Copy link
Member

Hang on, this will depend on the test runner. I guess we should be clear about which runner the docs are using.

Is there any other inconsistencies?

@ydah
Copy link
Author

ydah commented Jan 18, 2023

@lmiller1990 Thank you so much! Is there a test runner used in this document as a prerequisite? I may have missed it.

@lmiller1990
Copy link
Member

Actually, I guess it depends on the assert lib (jest's assertion chai, etc).

We should likely do an audit and specify which runner we are using throughout the entire docs to make it consistent.

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.

None yet

2 participants