Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Debugging option for test tasks

  • Loading branch information...
commit 5db21731e099126c1beb07f1dc8a14470993fa03 1 parent 90fd304
@geigerzaehler geigerzaehler authored
Showing with 5 additions and 5 deletions.
  1. +3 −3 README.md
  2. +2 −2 gruntfile.coffee
View
6 README.md
@@ -202,9 +202,9 @@ See [`the wiki`](https://github.com/josephg/ShareJS/wiki) for API documentation,
Testing
-------
-Running `grunt` starts a watch task for development.
-
-Using `grunt test` all tests are just executed once.
+Running `grunt` starts a watch task for development. Using `grunt test` all
+tests are just executed once. Passing the `--debug` option to the grunt tasks
+makes the share server dump the communication with clients.
All tests are located under the `test` directory. Browser tests are contained in
`test/browser` and node tests are located in `test/server`.
View
4 gruntfile.coffee
@@ -45,14 +45,14 @@ module.exports = (grunt) ->
grunt.registerTask 'server', 'Start a server to test clients', ->
done = this.async()
- server = require('./test/helpers/server')({log: false})
+ server = require('./test/helpers/server')({log: !!grunt.cli.options.debug})
server.listen(3000)
.on('listening', done)
.on 'error', (err) ->
if (err.code is 'EADDRINUSE')
grunt.fatal('Port 3000 is already in use by another process.')
else
- grunt.fatal(err);
+ grunt.fatal(err)
# Default Task
grunt.registerTask 'default', ['server', 'karma:dev:start', 'watch']
Please sign in to comment.
Something went wrong with that request. Please try again.