Skip to content

docs: fix an example code for mouse click - #2043

Open
ydah wants to merge 1 commit into
vuejs:devfrom
ydah:fix-doc-example
Open

docs: fix an example code for mouse click#2043
ydah wants to merge 1 commit into
vuejs:devfrom
ydah:fix-doc-example

Conversation

@ydah

@ydah ydah commented Dec 14, 2022

Copy link
Copy Markdown

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

netlify Bot commented Dec 14, 2022

Copy link
Copy Markdown

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

@lmiller1990 lmiller1990 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thanks!

@lmiller1990

Copy link
Copy Markdown
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

ydah commented Jan 18, 2023

Copy link
Copy Markdown
Author

@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
Copy Markdown
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.

2 participants