Skip to content

Instantly share code, notes, and snippets.

@EWhite613
Last active June 13, 2016 14:37
Show Gist options
  • Save EWhite613/0bb993b3c9aa939a8b4d2f195c358c02 to your computer and use it in GitHub Desktop.
Save EWhite613/0bb993b3c9aa939a8b4d2f195c358c02 to your computer and use it in GitHub Desktop.
SlimerJS launcher for Testem
/* 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