Skip to content

Instantly share code, notes, and snippets.

@jensgro
Forked from asciidisco/dalek_flocke.js
Created August 7, 2013 09:47
Show Gist options
  • Save jensgro/6172686 to your computer and use it in GitHub Desktop.
Save jensgro/6172686 to your computer and use it in GitHub Desktop.
module.exports = {
'A lot of screenshots': function (test) {
var resolutions = [{width: 1280, height: 1024}, {width: 1024, height: 768}, {width: 800, height: 600}];
var pages = ['http://facebook.com', 'http://twitter.com', 'http://dalekjs.com'];
resolutions.forEach(function (res) {
pages.forEach(function (page) {
test.open(page)
.resize(res)
.screenshot('pics/' + res.width + '_' + res.height + '_' + page.replace('http://', '') + '.png')
});
});
test.done();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment