Last active
June 13, 2016 14:37
-
-
Save EWhite613/0bb993b3c9aa939a8b4d2f195c358c02 to your computer and use it in GitHub Desktop.
SlimerJS launcher for Testem
This file contains 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
/* Testem usage | |
'launchers': { | |
'slimerjs': { | |
'command': 'slimerjs slimerjs-launcher.js <url>', | |
'protocol': 'browser' | |
} | |
} | |
*/ | |
// Doesn't exit on Linux for some reason | |
'use strict' | |
var system = require('system') | |
var page = require('webpage').create() | |
var url = system.args[1] | |
page.viewportSize = { | |
width: 1024, | |
height: 768 | |
} | |
page.open(url) | |
page.onError = function (msg, trace) { | |
console.log(msg) | |
trace.forEach(function (item) { | |
console.log(' ', item.file, ':', item.line) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment