filiphric / cypress-plugin-api

Cypress plugin to show your API information in the Cypress UI runner
ISC License
264 stars 35 forks source link

feat: expose api function #95

Closed jordanpowell88 closed 1 year ago

jordanpowell88 commented 1 year ago

I was just working on implementing this but I needed a way to wrap the cy.api(). It would be great if I could easily do something like this in my support file:

import { api } from 'cypress-plugin-api'

declare global {
  namespace Cypress {
    interface Chainable {
      api: typeof api
    }
  }
}

Cypress.Commands.add('api', myCustomMount)
filiphric commented 1 year ago

Great idea, thanks for this 👍 Releasing in 2.8.0