test-server

Easy testing of a HTTP server

test-server

Easy testing of a HTTP server

var testServer = require("test-server")
    , assert = require("assert")

testServer(function (req, res) {
    res.end("beep")
}, function (request, done) {
    request("/", function (err, res, body) {
        assert.equal(body, "beep")
        done()
    })
})

npm install test-server

make test

  • Raynos