Skip to content

Commit

Permalink
Added test for .toJSON()
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeal committed Apr 8, 2012
1 parent 7e24e8a commit 22e0f0d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/test-toJSON.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var request = require('../main')
, http = require('http')
, assert = require('assert')
;

var s = http.createServer(function (req, resp) {
resp.statusCode = 200
resp.end('asdf')
}).listen(8080, function () {
var r = request('http://localhost:8080', function (e, resp) {
assert(JSON.parse(JSON.stringify(r)).response.statusCode, 200)
s.close()
})
})

0 comments on commit 22e0f0d

Please sign in to comment.