Skip to content

Commit 98abc36

Browse files
committed
add callback error skipped test
1 parent 1ffefd4 commit 98abc36

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Callback error
2+
3+
If you enable this test it fails because the `cy.stub` throws an error.
4+
5+
<!-- fiddle.skip Callback error -->
6+
7+
```html
8+
<script>
9+
setTimeout(() => {
10+
console.log('Random error')
11+
}, 100)
12+
</script>
13+
```
14+
15+
```js
16+
cy.window()
17+
.its('console')
18+
.then((console) => {
19+
cy.stub(console, 'log').callsFake(function (...args) {
20+
throw new Error('Nope')
21+
})
22+
})
23+
cy.wait(1500)
24+
```
25+
26+
<!-- fiddle-end -->

0 commit comments

Comments
 (0)