Skip to content

Commit 48ed8dc

Browse files
committed
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| }) ```
1 parent e1ef76a commit 48ed8dc

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

Diff for: docs/fr/guides/dom-events.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ describe('Click event', () => {
8989
})
9090
wrapper.find('button.yes').trigger('click')
9191

92-
spy.should.have.been.calledWith('yes')
92+
expect(spy.calledWith('yes')).to.equal(true)
9393
})
9494
})
9595
```

Diff for: docs/guides/dom-events.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ it('Click on yes button calls our method with argument "yes"', async () => {
8888
})
8989
await wrapper.find('button.yes').trigger('click')
9090

91-
spy.should.have.been.calledWith('yes')
91+
expect(spy.calledWith('yes')).to.equal(true)
9292
})
9393
```
9494

Diff for: docs/ja/guides/dom-events.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ it('Click on yes button calls our method with argument "yes"', async () => {
8383
})
8484
await wrapper.find('button.yes').trigger('click')
8585

86-
spy.should.have.been.calledWith('yes')
86+
expect(spy.calledWith('yes')).to.equal(true)
8787
})
8888
```
8989

Diff for: docs/ru/guides/dom-events.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ describe('Click event', () => {
8181
})
8282
wrapper.find('button.yes').trigger('click')
8383

84-
spy.should.have.been.calledWith('yes')
84+
expect(spy.calledWith('yes')).to.equal(true)
8585
})
8686
})
8787
```

Diff for: docs/zh/guides/dom-events.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ it('Click on yes button calls our method with argument "yes"', async () => {
8888
})
8989
await wrapper.find('button.yes').trigger('click')
9090

91-
spy.should.have.been.calledWith('yes')
91+
expect(spy.calledWith('yes')).to.equal(true)
9292
})
9393
```
9494

0 commit comments

Comments
 (0)