Merge branch 'master' of https://github.com/ajayyy/SponsorBlockServer into stricter-eslint

This commit is contained in:
Michael C
2021-07-13 15:55:03 -04:00
18 changed files with 145 additions and 48 deletions

View File

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