mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-07 12:07:07 +03:00
Fix reputation test
This commit is contained in:
@@ -208,7 +208,7 @@ describe("reputation", () => {
|
|||||||
assert.strictEqual(data, 0.19310344827586207);
|
assert.strictEqual(data, 0.19310344827586207);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("user with high reputation and locked segments", async () => {
|
it("user with high reputation and locked segmentsssss", async () => {
|
||||||
const metrics = {
|
const metrics = {
|
||||||
totalSubmissions: 8,
|
totalSubmissions: 8,
|
||||||
downvotedSubmissions: 1,
|
downvotedSubmissions: 1,
|
||||||
@@ -217,11 +217,11 @@ describe("reputation", () => {
|
|||||||
lockedSum: 4,
|
lockedSum: 4,
|
||||||
semiOldUpvotedSubmissions: 5,
|
semiOldUpvotedSubmissions: 5,
|
||||||
oldUpvotedSubmissions: 5,
|
oldUpvotedSubmissions: 5,
|
||||||
mostUpvotedInLockedVideoSum: 0
|
mostUpvotedInLockedVideoSum: 4
|
||||||
};
|
};
|
||||||
const data = await getReputation(userHashHighAndLocked);
|
const data = await getReputation(userHashHighAndLocked);
|
||||||
assert.strictEqual(data, calculateReputationFromMetrics(metrics));
|
assert.strictEqual(data, calculateReputationFromMetrics(metrics));
|
||||||
assert.strictEqual(data, 1.793103448275862);
|
assert.strictEqual(data, 3.393103448275862);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("user with most upvoted segments in locked video", async () => {
|
it("user with most upvoted segments in locked video", async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user