fix tests and linting

This commit is contained in:
Michael C
2021-07-22 17:50:39 -04:00
parent dbc8558ec8
commit 87727ef360
5 changed files with 35 additions and 33 deletions

View File

@@ -99,18 +99,17 @@ describe("postWarning", () => {
.catch(err => done(err));
});
it('Should return 400 if missing body', (done: Done) => {
fetch(getbaseURL()
+ "/api/warnUser", {
method: 'POST',
it("Should return 400 if missing body", (done: Done) => {
fetch(`${getbaseURL()}/api/warnUser`, {
method: "POST",
headers: {
'Content-Type': 'application/json',
"Content-Type": "application/json",
}
})
.then(async res => {
assert.strictEqual(res.status, 400);
done();
})
.catch(err => done(err));
.then(async res => {
assert.strictEqual(res.status, 400);
done();
})
.catch(err => done(err));
});
});