import type { RouteHandler } from 'cypress/types/net-stubbing'; declare global { // eslint-disable-next-line @typescript-eslint/no-namespace namespace Cypress { // eslint-disable-next-line @typescript-eslint/no-unused-vars interface Chainable { mockGQL(handler: RouteHandler): void; } } } export function addMockGQLCommand() { Cypress.Commands.add('mockGQL', (handler: RouteHandler) => { cy.intercept( 'POST', 'https://api.n11.testnet.vega.xyz/graphql', handler ).as('GQL'); }); }