Skip to content

Commit

Permalink
test: added test cases for rt news and xvideos
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyhalight committed Jan 7, 2025
1 parent 826522e commit fe54e5c
Showing 1 changed file with 26 additions and 3 deletions.
29 changes: 26 additions & 3 deletions tests/videoData.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,25 @@ describe("vimeo", () => {
});
});

test("xvideos", async () => {
const expected = "https://www.xvideos.com/video.iulmvlvbaff/_";
expect(await normalize(expected)).toEqual(expected);
describe("xvideos", () => {
const pathname = "video.iulmvlvbaff/_";
const expected = `https://www.xvideos.com/${pathname}`;
test("normal", async () => {
expect(await normalize(expected)).toEqual(expected);
});
test("xv-ru", async () => {
expect(await normalize(`https://xv-ru.com/${pathname}`)).toEqual(expected);
});
test("xvideos-ar", async () => {
expect(await normalize(`https://xvideos-ar.com/${pathname}`)).toEqual(
expected,
);
});
test("xvideos with numbers", async () => {
expect(await normalize(`https://xvideos005.com/${pathname}`)).toEqual(
expected,
);
});
});

describe("pornhub", () => {
Expand Down Expand Up @@ -678,3 +694,10 @@ describe("loom", () => {
expect(normalized).toEqual(expected);
});
});

test("rt news", async () => {
const normalized = await normalize(
"https://www.rt.com/russia/610519-putin-attends-mass-christmas/",
);
expect(normalized).toInclude(".mp4");
});

0 comments on commit fe54e5c

Please sign in to comment.