mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 09:07:47 +01:00
assert fixed value
This commit is contained in:
parent
0eb298a943
commit
37ea8adb73
1 changed files with 2 additions and 2 deletions
|
@ -118,7 +118,6 @@ describe("reputation", () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it("user with high downvote ratio", async () => {
|
it("user with high downvote ratio", async () => {
|
||||||
// -2.125
|
|
||||||
const metrics = {
|
const metrics = {
|
||||||
totalSubmissions: 8,
|
totalSubmissions: 8,
|
||||||
downvotedSubmissions: 5,
|
downvotedSubmissions: 5,
|
||||||
|
@ -131,10 +130,10 @@ describe("reputation", () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
assert.strictEqual(await getReputation(getHash(userIDHighDownvotes)), calculateReputationFromMetrics(metrics));
|
assert.strictEqual(await getReputation(getHash(userIDHighDownvotes)), calculateReputationFromMetrics(metrics));
|
||||||
|
assert.strictEqual(await getReputation(getHash(userIDHighDownvotes)), -2.125);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("user with high non self downvote ratio", async () => {
|
it("user with high non self downvote ratio", async () => {
|
||||||
// -1.6428571428571428
|
|
||||||
const metrics = {
|
const metrics = {
|
||||||
totalSubmissions: 8,
|
totalSubmissions: 8,
|
||||||
downvotedSubmissions: 2,
|
downvotedSubmissions: 2,
|
||||||
|
@ -146,6 +145,7 @@ describe("reputation", () => {
|
||||||
mostUpvotedInLockedVideoSum: 0
|
mostUpvotedInLockedVideoSum: 0
|
||||||
};
|
};
|
||||||
assert.strictEqual(await getReputation(getHash(userIDHighNonSelfDownvotes)), calculateReputationFromMetrics(metrics));
|
assert.strictEqual(await getReputation(getHash(userIDHighNonSelfDownvotes)), calculateReputationFromMetrics(metrics));
|
||||||
|
assert.strictEqual(await getReputation(getHash(userIDHighNonSelfDownvotes)), -1.6428571428571428);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("user with mostly new submissions", async () => {
|
it("user with mostly new submissions", async () => {
|
||||||
|
|
Loading…
Reference in a new issue