mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-30 19:38:28 +03:00
Fix flaky test
This commit is contained in:
@@ -685,14 +685,15 @@ describe("voteOnSponsorTime", () => {
|
|||||||
|
|
||||||
it("Should not be able to revive full video segment as non-vip", (done) => {
|
it("Should not be able to revive full video segment as non-vip", (done) => {
|
||||||
const UUID = "full-video-uuid-1";
|
const UUID = "full-video-uuid-1";
|
||||||
postVote("VIPUser", UUID, 0); // downvote as VIP
|
postVote("VIPUser", UUID, 0).then(() => {
|
||||||
postVote("randomID3", UUID, 1)
|
postVote("randomID3", UUID, 1)
|
||||||
.then(async res => {
|
.then(async res => {
|
||||||
assert.strictEqual(res.status, 200);
|
assert.strictEqual(res.status, 200);
|
||||||
const row = await getSegmentVotes(UUID);
|
const row = await getSegmentVotes(UUID);
|
||||||
assert.strictEqual(row.votes, -2);
|
assert.strictEqual(row.votes, -2);
|
||||||
done();
|
done();
|
||||||
})
|
})
|
||||||
.catch(err => done(err));
|
.catch(err => done(err));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user