Cara Mendapatkan Teks Konsol di Cypress

cy.visit('/', {
  onBeforeLoad(win) {
    cy.stub(win.console, 'log').as('consoleLog')
  },
})

//...
cy.get('@consoleLog').should('be.calledWith', 'Hello World!')
Bloody Bear