mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-22 23:48:27 +03:00
fix missed awaits for db.prepare in test cases
This commit is contained in:
@@ -9,10 +9,10 @@ describe("postSkipSegments - LockedVideos", () => {
|
||||
const videoID = "lockedVideo";
|
||||
const userID = userIDOne;
|
||||
|
||||
before(() => {
|
||||
before(async () => {
|
||||
const insertLockCategoriesQuery = `INSERT INTO "lockCategories" ("userID", "videoID", "category", "reason") VALUES(?, ?, ?, ?)`;
|
||||
db.prepare("run", insertLockCategoriesQuery, [getHash(VIPLockUser), videoID, "sponsor", "Custom Reason"]);
|
||||
db.prepare("run", insertLockCategoriesQuery, [getHash(VIPLockUser), videoID, "intro", ""]);
|
||||
await db.prepare("run", insertLockCategoriesQuery, [getHash(VIPLockUser), videoID, "sponsor", "Custom Reason"]);
|
||||
await db.prepare("run", insertLockCategoriesQuery, [getHash(VIPLockUser), videoID, "intro", ""]);
|
||||
});
|
||||
|
||||
it("Should return 403 and custom reason for submiting in lockedCategory", (done) => {
|
||||
@@ -67,4 +67,4 @@ describe("postSkipSegments - LockedVideos", () => {
|
||||
})
|
||||
.catch(err => done(err));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user