Created
July 19, 2017 22:58
-
-
Save joelgriffith/0310b48962aa2dd297e606495658a6a5 to your computer and use it in GitHub Desktop.
Visual Regression Testing in Navali
This file contains hidden or 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
const { Chrome } = require('navalia'); | |
const { toMatchImageSnapshot } = require('jest-image-snapshot'); | |
expect.extend({ toMatchImageSnapshot }); | |
describe('Visual Regressions', () => { | |
let chrome = null; | |
beforeEach(() => { | |
chrome = new Chrome(); | |
}); | |
afterEach(() => { | |
chrome.done(); | |
}); | |
it('should NEVER happen', () => { | |
return chrome.goto('http://www.my-webpage.com') | |
.then(() => chrome.screenshot()) | |
.then((image) => expect(image).toMatchImageSnapshot()); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment