Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added definitions to do 'npm test'

Created a wrapper around zap to fix up return codes in Cakefile.
  • Loading branch information...
commit e88fd67f877d970cf2f84f432e2e6fec8befdccf 1 parent 2519e07
@Leonidas-from-XIV authored
Showing with 10 additions and 0 deletions.
  1. +7 −0 Cakefile
  2. +3 −0  package.json
View
7 Cakefile
@@ -4,6 +4,13 @@ task 'build', 'continually build the JavaScript code', ->
coffee = spawn 'coffee', ['-cw', '-o', 'lib', 'src']
coffee.stdout.on 'data', (data) -> console.log data.toString().trim()
+task 'test', 'run the test suite', ->
+ # wrapper around zap to return nonzero if tests failed
+ exec 'zap', (err, stdout, stderr) ->
+ if stdout.indexOf("\u001b[1;31mfailed\u001b[0m") != -1
+ console.log stdout.trim()
+ process.exit 1
+
task 'doc', 'rebuild the Docco documentation', ->
exec([
'docco src/xml2js.coffee'
View
3  package.json
@@ -25,6 +25,9 @@
"directories" : {
"lib": "./lib"
},
+ "scripts" : {
+ "test": "cake test"
+ },
"repository" : {
"type" : "git",
"url" : "https://github.com/Leonidas-from-XIV/node-xml2js.git"
Please sign in to comment.
Something went wrong with that request. Please try again.