Skip to content

Commit

Permalink
feat(config): make socket.io transports configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Jun 15, 2013
1 parent 76bdac1 commit bbd5eb8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docs/config/01-configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,14 @@ If `true`, it captures browsers, runs tests and exits with `0` exit code (if all
`1` exit code (if any test failed).


## transports
**Type:** Array

**Default:** `['websocket', 'flashsocket', 'xhr-polling', 'jsonp-polling']`

**Description:** An array of allowed transport methods between the server and the client. This is configuration of [socket.io](https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO).


## urlRoot
**Type:** String

Expand Down
1 change: 1 addition & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ var parseConfig = function(configFilePath, cliOptions) {
dir: 'coverage/'
},
loggers: [ constant.CONSOLE_APPENDER ],
transports: [ 'websocket', 'flashsocket', 'xhr-polling', 'jsonp-polling' ],
plugins: [ 'karma-*' ]
};
var dsl = new KarmaDsl(config);
Expand Down
2 changes: 1 addition & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ var start = function(injector, config, launcher, globalEmitter, preprocess, file
var socketServer = io.listen(webServer, {
logger: logger.create('socket.io', constant.LOG_ERROR),
resource: config.urlRoot + 'socket.io',
transports: ['websocket', 'flashsocket', 'xhr-polling', 'jsonp-polling']
transports: config.transports
});

webServer.updateFilesPromise(filesPromise);
Expand Down

0 comments on commit bbd5eb8

Please sign in to comment.