Extending Supertest

DateReadtime 3 minutes Series Part 1 of Testing Express Tags

I have an express app running behind an Apache reverse proxy with mod_auth_mellon used to authenticate users via SAML.

As a result of relying on headers for auth, I have lots of mocha tests that look like:

it("should add a comment with a user", (done) => {
    let expectedUser = "a User …
more ...