forwardemail / forwardemail/supertest

Set Base Url

Open
#757 1 comment 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
14.4k
Forks
782
PR merge metrics
No merged PRs in 30d

Description

Normally could have something like this
```
import app from "wherever"
import request from "supertest";

const client = request(app)

await client
.post("/api/v1/user/signin")
.send({
email: "lagbaja@tamedo.com", // not real email
password: "nnkanasiri",
})
.expect(401);
});
```

Suggesting we get something like this
```
import app from "wherever"
import request from "supertest";

const client = request(app).baseUrl("/api/v1")

await request(app)
.post("/user/signin")
.send({
email: "lagbaja@tamedo.com",
password: "nnkanasiri",
})
.expect(401);
});
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.