Tizen 2.0 Release
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.2.0 / node_modules / testswarm / node_modules / request / tests / test-toJSON.js
1 var request = require('../main')
2   , http = require('http')
3   , assert = require('assert')
4   ;
5
6 var s = http.createServer(function (req, resp) {
7   resp.statusCode = 200
8   resp.end('asdf')
9 }).listen(8080, function () {
10   var r = request('http://localhost:8080', function (e, resp) {
11     assert.equal(JSON.parse(JSON.stringify(r)).response.statusCode, 200)
12     s.close()
13   })
14 })