They would have to start by actually following the monad laws though... Just spent a couple of hours trying to figure out how to write a sequence function to avoid deeply nested and completely unnecessary then callbacks. Turns out there's some kind of global state going on so it's never going to work, just great...

If you define a function called foo

function foo(actions) {
const [action, ...rest] = actions;
action.then(x => cy.log(x));
}

and then call it like this

const list = [cy.wrap(7), cy.wrap(8)];
const nine = cy.wrap(9);
foo(list);

You would expect 7 to get logged -- but nope, 9 does… Makes no sense whatsoever, just prevents any kind of user-defined abstraction. What utter garbage

rlamacraft
Cypress would be so much easier if it came with basic monad combinators and do-notation. Seriously considering prototyping a PureScript wrapper…

QOTO: Question Others to Teach Ourselves