-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable passing string arguments to timers (#2025)
fixes #1854
- Loading branch information
1 parent
df0ec8e
commit 55b352a
Showing
2 changed files
with
47 additions
and
29 deletions.
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
13 changes: 13 additions & 0 deletions
13
packages/driver/test/cypress/integration/issues/1854_spec.js
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,13 @@ | ||
describe('issue #1854', () => { | ||
it('does not error when using setTimeouts referencing string globals', () => { | ||
cy.visit('/fixtures/generic.html') | ||
cy.window().then((win) => { | ||
win.foo = (arg) => { | ||
win.bar = arg | ||
} | ||
|
||
win.setTimeout('foo(true)', 100) | ||
}) | ||
cy.window().its('bar').should('be.true') | ||
}) | ||
}) |