substack/testling — pull request #69 by azylman (2014-03-07 18:50:42+00:00)
Title: don't depend on calling browser-launcher with -x

Currently, the `-x` command always errors out with the message "No headless browser found".

This is because you only set the `launch` variable if you didn't pass the x flag: https://github.com/substack/testling/blob/master/bin/cmd.js#L194-203

However, currently you check if `launch` exists whether you need it or not and, if it doesn't, you error out.

I moved all of the code for setting up the options for `browser-launcher` into the else statement where it's executed, since it's not needed in other places.