airportyh/testem — pull request #398 by sebastianseilund (2014-08-25 20:14:26+00:00)
Title: Added phantomjs_viewport_size config option

We have a test suite that tests a webapp with some drag and drop functionality. For that to work the browser's viewport needs to be a certain size.

This PR makes it possible for users to add `phantomjs_viewport_size` to their `testem.json` and get control over the window's size.

Example:

```json
{
"phantomjs_viewport_size": {
"width": 1000,
"height": 800
}
}
```

I added a new test file `tests/browser_launcher_tests.js` that tests the `lib/browser_launcher.js` module. I only added tests concering the PhantomJS command line args. Let me know if you want the tests on a different format.

Questions:

- I added a validation check of the values of `width` and `height`. I'm not sure what your preferred way of warning the user about this is? I just had it throw an exception.