gray-kilobyte-89541
08/16/2022, 8:56 PMts
describe('casting an aliased value', () => {
it('yields a number', () => {
// this particular alias keeps a number
cy.wrap(42).as('magic')
cy.get<number>('@magic').then((n) => {
expect(n).to.be.a('number').and.to.equal(42)
})
})
})
Other commands can be cast similarly