Skip to content

Commit 5db2173

Browse files
author
Thomas Scholtes
committed
Debugging option for test tasks
1 parent 90fd304 commit 5db2173

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ See [`the wiki`](https://github.com/josephg/ShareJS/wiki) for API documentation,
202202
Testing
203203
-------
204204

205-
Running `grunt` starts a watch task for development.
206-
207-
Using `grunt test` all tests are just executed once.
205+
Running `grunt` starts a watch task for development. Using `grunt test` all
206+
tests are just executed once. Passing the `--debug` option to the grunt tasks
207+
makes the share server dump the communication with clients.
208208

209209
All tests are located under the `test` directory. Browser tests are contained in
210210
`test/browser` and node tests are located in `test/server`.

gruntfile.coffee

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ module.exports = (grunt) ->
4545

4646
grunt.registerTask 'server', 'Start a server to test clients', ->
4747
done = this.async()
48-
server = require('./test/helpers/server')({log: false})
48+
server = require('./test/helpers/server')({log: !!grunt.cli.options.debug})
4949
server.listen(3000)
5050
.on('listening', done)
5151
.on 'error', (err) ->
5252
if (err.code is 'EADDRINUSE')
5353
grunt.fatal('Port 3000 is already in use by another process.')
5454
else
55-
grunt.fatal(err);
55+
grunt.fatal(err)
5656

5757
# Default Task
5858
grunt.registerTask 'default', ['server', 'karma:dev:start', 'watch']

0 commit comments

Comments
 (0)