Skip to content

Commit c88ebc6

Browse files
authored
fix(server): Resurrect static function Server.start() lost in 2.0.3 (#3055)
1 parent b99f03f commit c88ebc6

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

lib/server.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,10 @@ class Server extends KarmaEventEmitter {
373373
})
374374
child.unref()
375375
}
376+
377+
static start (cliOptions, done) {
378+
return new Server(cliOptions, done)
379+
}
376380
}
377381

378382
Server.prototype._start.$inject = ['config', 'launcher', 'preprocess', 'fileList', 'capturedBrowsers', 'executor', 'done']

test/unit/server.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,4 +241,8 @@ describe('server', () => {
241241
}
242242
})
243243
})
244+
245+
it('static Server constructs a server', () => {
246+
expect(Server.start(mockConfig) instanceof Server).to.be.true
247+
})
244248
})

0 commit comments

Comments
 (0)