fix missed awaits for db.prepare in test cases

This commit is contained in:
mini-bomba
2025-09-10 23:24:44 +02:00
parent c942eea640
commit 5664ff4f58
9 changed files with 36 additions and 36 deletions

View File

@@ -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));
});
});
});