Cy events
Cypress test runner fires events you can subscribe to. For example, we can listen to the command start and finish events. See the full Cypress Catalog of Events for more.
cy.on('command:start', (cmd) => {
console.log('started command', cmd)
})
cy.wrap('hello').should('equal', 'hello')
Tip: I used these events to log all commands and their arguments in my cypress-failed-log plugin.