Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
'use strict';
module.exports = config => {
config.set({
basePath: '../../',
frameworks: ['jasmine'],
files: [
'test/visual-diff/break-styles.css',
{ pattern: 'src/**/*.js', included: false, served: true },
{ pattern: 'test/assets/*.{png,jpg}', included: false, served: true },
'test/visual-diff/renderers/helper.js',
'test/visual-diff/renderers/**/*-test.js'
],
autoWatch: false,
client: { useIframe: false },
browsers: ['PhantomJSScreenshot'],
customLaunchers: {
'PhantomJSScreenshot': {
base: 'PhantomJS',
options: {
onPageCreated: function(newPage) {
// Even though this looks like standard javascript that can access
// higher scopes in this file, it actually gets serialized and
// passed as a script to phantomjs. This means some things are
// actually in scope (like a `page` object) and other things are
// not (like anything you might define at the top of this file).
//
newPage.viewportSize = { width: 400, height: 700 };
newPage.onCallback = function(data) {
if (data.type === 'render') {
var path = '/visual-diff/results/' + data.name + '.png';
newPage.render(path, { format: 'png', quality: 100 });
}
}
}
}
}
},
singleRun: true,
reporters: ['spec'],
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.