-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
Description
Based on jest-puppeteer-example it would be great to extend NodeEnvironment similar to this
for example, this will avoid differencify.launchBrowser() and differencify.cleanup() on this example
(async () => {
await differencify.launchBrowser();
const target = differencify.init({ testName: 'Differencify simple unchained', chain: false });
const page = await target.newPage();
await page.goto('https://github.com/NimaSoroush/differencify');
await page.setViewport({ width: 1600, height: 1200 });
await page.waitFor(1000);
const image = await page.screenshot();
const result = await target.toMatchSnapshot(image);
await page.close();
console.log(result) // True or False
await differencify.cleanup();
})();
@xfumihiro: Anything to add?
Reactions are currently unavailable