Skip to content

Commit

Permalink
fix(server): Resurrect static function Server.start() lost in 2.0.3 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjbarton authored Jun 20, 2018
1 parent b99f03f commit c88ebc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,10 @@ class Server extends KarmaEventEmitter {
})
child.unref()
}

static start (cliOptions, done) {
return new Server(cliOptions, done)
}
}

Server.prototype._start.$inject = ['config', 'launcher', 'preprocess', 'fileList', 'capturedBrowsers', 'executor', 'done']
Expand Down
4 changes: 4 additions & 0 deletions test/unit/server.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,8 @@ describe('server', () => {
}
})
})

it('static Server constructs a server', () => {
expect(Server.start(mockConfig) instanceof Server).to.be.true
})
})

0 comments on commit c88ebc6

Please sign in to comment.