Skip to content

Instantly share code, notes, and snippets.

@rafael-anachoreta
Created November 14, 2018 10:42
Show Gist options
  • Save rafael-anachoreta/79b2bcf1ea66416676eaf3e9c73a5043 to your computer and use it in GitHub Desktop.
Save rafael-anachoreta/79b2bcf1ea66416676eaf3e9c73a5043 to your computer and use it in GitHub Desktop.
//__bug.spec.js
describe('Bug', ()=>{
before(() =>{
cy.task('message', 'I\'m running!');
});
it('Should only log once', () => {
cy.visit('https://www.google.com');
});
});
//index.js
module.exports = (on) => {
on('task', {
message (args) {
console.log(args);
return null;
}
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment