mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-18 22:28:38 -05:00
834 B
834 B
title, comments, description
| title | comments | description |
|---|---|---|
| wrap | true |
Return the object passed into cy.wrap.
| Returns | the object passed into cy.wrap |
| Timeout | cannot timeout |
cy.wrap( object )
Return the object passed into cy.wrap.
Options
Pass in an options object to change the default behavior of cy.wrap.
cy.wrap( object, options )
| Option | Default | Notes |
|---|---|---|
log |
true |
whether to display command in command log |
Usage
Invokes the function on the subject in wrap and returns the new value.
var fn = function(){
return "bar"
}
cy.wrap({foo: fn}).invoke("foo").should("eq", "bar") // true