forked from karma-runner/karma
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a slew of new api possibilities to the server. All main events from the `globalEmitter` are now emitted on the `server` instances and publicly available. For a list of available events see the docs file. BREAKING CHANGE: The public api interface has changed to a constructor form. To upgrade change ```javascript var server = require(‘karma’).server server.start(config, done) ``` to ```javascript var Server = require(‘karma’).Server var server = new Server(config, done) server.start() ``` Closes karma-runner#1037, karma-runner#1482, karma-runner#1467
- Loading branch information
1 parent
48e3000
commit 82cbbad
Showing
5 changed files
with
291 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,26 @@ | ||
// index module | ||
exports.VERSION = require('./constants').VERSION | ||
exports.server = require('./server') | ||
exports.runner = require('./runner') | ||
exports.launcher = require('./launcher') | ||
|
||
var constants = require('./constants') | ||
var Server = require('./server') | ||
var runner = require('./runner') | ||
var launcher = require('./launcher') | ||
|
||
// TODO: remove in 1.0 | ||
var oldServer = { | ||
start: function () { | ||
throw new Error( | ||
'The api interface has changed. Please use \n' + | ||
' server = new Server(config, [done])\n' + | ||
' server.start()\n' + | ||
'instead.' | ||
) | ||
} | ||
} | ||
|
||
module.exports = { | ||
VERSION: constants.VERSION, | ||
Server: Server, | ||
runner: runner, | ||
launcher: launcher, | ||
server: oldServer | ||
} |
Oops, something went wrong.