forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
call setTimeout with the right global scope to prevent 'this' f… (cyp…
- Loading branch information
1 parent
5d2825c
commit ff6bdcd
Showing
3 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<body> | ||
<script> | ||
'use strict'; | ||
window.setTimeout(function () { | ||
this.foo = 'bar' | ||
}, 50) | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// https://github.com/cypress-io/cypress/issues/5707 | ||
describe('issue 5707', () => { | ||
it('calls setTimeout with the correct context', () => { | ||
cy.visit('/fixtures/issue-5707.html') | ||
cy.window().its('foo').should('eq', 'bar') | ||
}) | ||
}) |