late-planet-4481
12/22/2022, 2:12 PMjs
it('returns values', () => {
const message = returnSomething()
cy.log(message)
})
function returnSomething() {
cy.log('howdy').then(() => {
return 'yo'
})
}
Expected: It should log 'yo'
Actual: It logs nothing
The reason I have this under 'best-practices' is because I can work around this using aliases like I would global variables, but doing that feels ugly and wrong.