• Sets of an IHttpServer instance for run tests with supertest in a common and powerful way.

    Parameters

    Returns void

    Example

    import createServer from "@egomobile/http-server"
    import { setupTestEventListener } from "@egomobile/http-supertest"

    const app = createServer()

    // s. https://github.com/egomobile/node-http-server/wiki/Testing
    app.controllers()

    // register `test` event: https://egomobile.github.io/node-http-server/interfaces/IHttpServer.html#on
    setupTestEventListener({
    "server": app
    })

    await app.test()

Generated using TypeDoc