Skip to content

Commit

Permalink
docs: fix an example code for mouse click
Browse files Browse the repository at this point in the history
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
1 parent e1ef76a commit 48ed8dc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/fr/guides/dom-events.md
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
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
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
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
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

0 comments on commit 48ed8dc

Please sign in to comment.