Created
October 12, 2023 08:41
-
-
Save beshur/c2c384e9572253f63049a8de4db2b0a3 to your computer and use it in GitHub Desktop.
mock cypress VRT plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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