Skip to content

Commit

Permalink
Better npm test support
Browse files Browse the repository at this point in the history
* remove control characters in stdout
** disable color
** use specification reporter instead of dots, dots add a control char for async tests
  • Loading branch information
scothis committed May 29, 2012
1 parent 407b019 commit e5168bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -23,14 +23,15 @@
}
],
"dependencies": {
"when": "https://github.com/cujojs/when/tarball/1.1.1"
"when": "~1.2"
},
"devDependencies": {
"poly": "https://github.com/scothis/poly/tarball/npm",
"buster": "~0.5",
"jshint": "~0"
"jshint": ""
},
"main": "./src/rest",
"scripts": {
"test": "jshint src && jshint test && buster test -e node"
"test": "jshint src test && buster test -e node --color none --reporter specification"
}
}
2 changes: 1 addition & 1 deletion src/rest/client/xhr.js
Expand Up @@ -58,7 +58,7 @@
client.onreadystatechange = function (e) {
var response;

if (client.readyState === XMLHttpRequest.DONE) {
if (client.readyState === (XMLHttpRequest.DONE || 4)) {
response = {};
response.request = request;
response.raw = client;
Expand Down

0 comments on commit e5168bf

Please sign in to comment.