Skip to content

Instantly share code, notes, and snippets.

@rainerhahnekamp
Created August 3, 2021 08:35
Embed
What would you like to do?
it('should fail', () => {
let isSuccessful = false;
cy.visit('');
cy.get('button').click();
cy.get('div.message').then(() => {
isSuccessful = true;
});
if (!isSuccessful) {
throw new Error('something is not working');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment