包详细信息

test-server

Raynos660.2.1

Easy testing of a HTTP server

自述文件

test-server build status

Easy testing of a HTTP server

Example

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()
    })
})

Installation

npm install test-server

Tests

make test

Contributors

  • Raynos

MIT Licenced