Skip to content

Instantly share code, notes, and snippets.

@beshur
Created October 12, 2023 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beshur/c2c384e9572253f63049a8de4db2b0a3 to your computer and use it in GitHub Desktop.
Save beshur/c2c384e9572253f63049a8de4db2b0a3 to your computer and use it in GitHub Desktop.
mock cypress VRT plugin
/* global Cypress, cy */
const commandsToMock = ['vrtStart', 'vrtStop', 'vrtTrack', 'vrtTrackBuffer', 'vrtTrackBase64'];
export default function mockVrtComands() {
commandsToMock.forEach((command) => {
Cypress.Commands.add(
command,
{
// optional: may start a chain, or use an existing chain: (dual command)
prevSubject: 'optional',
},
() => {}, // can be lodash/noop
);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment