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