Skip to content

docs: fix an example code for mouse click #2043

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
docs: fix an example code for mouse click
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|   })
```
  • Loading branch information
ydah committed Dec 14, 2022
commit 48ed8dc966be5edcb76b9d9810ee451256900111
2 changes: 1 addition & 1 deletion docs/fr/guides/dom-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe('Click event', () => {
})
wrapper.find('button.yes').trigger('click')

spy.should.have.been.calledWith('yes')
expect(spy.calledWith('yes')).to.equal(true)
})
})
```
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/dom-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ it('Click on yes button calls our method with argument "yes"', async () => {
})
await wrapper.find('button.yes').trigger('click')

spy.should.have.been.calledWith('yes')
expect(spy.calledWith('yes')).to.equal(true)
})
```

Expand Down
2 changes: 1 addition & 1 deletion docs/ja/guides/dom-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ it('Click on yes button calls our method with argument "yes"', async () => {
})
await wrapper.find('button.yes').trigger('click')

spy.should.have.been.calledWith('yes')
expect(spy.calledWith('yes')).to.equal(true)
})
```

Expand Down
2 changes: 1 addition & 1 deletion docs/ru/guides/dom-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('Click event', () => {
})
wrapper.find('button.yes').trigger('click')

spy.should.have.been.calledWith('yes')
expect(spy.calledWith('yes')).to.equal(true)
})
})
```
Expand Down
2 changes: 1 addition & 1 deletion docs/zh/guides/dom-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ it('Click on yes button calls our method with argument "yes"', async () => {
})
await wrapper.find('button.yes').trigger('click')

spy.should.have.been.calledWith('yes')
expect(spy.calledWith('yes')).to.equal(true)
})
```

Expand Down