my advice is to return Cypress chainable instance ...
# best-practices
g
my advice is to return Cypress chainable instance to do
Copy code
js
function returnSomething() {
  return cy.log('howdy').then(() => {
    return 'yo'
  })
}
it('returns values', () => {
  returnSomething().then(cy.log)
})
Also about return values - inside
returnSomething
you could do
Copy code
js
function returnSomething() {
  cy.log('howdy')
  return cy.wrap('yo')
}