[finishes #53934269] jasmine-ci command returns non-zero exit code on error

Separated TestServerThread to top-level class for testability.