improve server tests

squashed commits:
* use single quotes
* add missing var statement
* fix deprecation warning
  We have to ensure this.options is an object before setting properties on it.
* remove unnecessary whitespace in formatted string
* add missing tests for server
Merge pull request #315 from lusini/improve-server-tests

Improve server tests