SponsorBlockServer/test/cases/getSubmissionUUID.ts

13 lines
614 B
TypeScript
Raw Normal View History

2021-09-23 00:52:35 +02:00
import { getSubmissionUUID } from "../../src/utils/getSubmissionUUID";
2021-07-12 08:43:46 +02:00
import assert from "assert";
2022-01-06 21:20:41 +01:00
import { ActionType, VideoID, Service, Category } from "../../src/types/segments.model";
2021-07-12 08:43:46 +02:00
import { UserID } from "../../src/types/user.model";
2020-10-17 20:56:54 +02:00
2021-07-12 08:43:46 +02:00
describe("getSubmissionUUID", () => {
it("Should return the hashed value", () => {
2021-09-30 08:56:55 +02:00
assert.strictEqual(
2022-01-06 21:20:41 +01:00
getSubmissionUUID("video001" as VideoID, "sponsor" as Category, "skip" as ActionType, "testuser001" as UserID, 13.33337, 42.000001, Service.YouTube),
"2a473bca993dd84d8c2f6a4785989b20948dfe0c12c00f6f143bbda9ed561dca6");
2020-10-17 20:56:54 +02:00
});
});