switch test videoID, remove useless import

This commit is contained in:
Michael C
2022-09-26 15:44:04 -04:00
parent 62a9b0eddd
commit 07926ada57

View File

@@ -1,26 +1,25 @@
import { config } from "../../src/config"; import { config } from "../../src/config";
import assert from "assert"; import assert from "assert";
// import { innerTubeVideoDetails } from "../../src/types/innerTubeApi.model";
import { YouTubeAPI } from "../../src/utils/youtubeApi"; import { YouTubeAPI } from "../../src/utils/youtubeApi";
import * as innerTube from "../../src/utils/innerTubeAPI"; import * as innerTube from "../../src/utils/innerTubeAPI";
import { partialDeepEquals } from "../utils/partialDeepEquals"; import { partialDeepEquals } from "../utils/partialDeepEquals";
import { getVideoDetails } from "../../src/utils/getVideoDetails"; import { getVideoDetails } from "../../src/utils/getVideoDetails";
const videoID = "dQw4w9WgXcQ"; const videoID = "BaW_jenozKc";
const expectedInnerTube = { // partial type of innerTubeVideoDetails const expectedInnerTube = { // partial type of innerTubeVideoDetails
videoId: videoID, videoId: videoID,
title: "Rick Astley - Never Gonna Give You Up (Official Music Video)", title: "youtube-dl test video \"'/\\ä↭𝕐",
lengthSeconds: "212", lengthSeconds: "10",
channelId: "UCuAXFkgsw1L7xaCfnd5JJOw", channelId: "UCLqxVugv74EIW3VWh2NOa3Q",
isOwnerViewing: false, isOwnerViewing: false,
isCrawlable: true, isCrawlable: true,
allowRatings: true, allowRatings: true,
author: "Rick Astley", author: "Philipp Hagemeister",
isPrivate: false, isPrivate: false,
isUnpluggedCorpus: false, isUnpluggedCorpus: false,
isLiveContent: false isLiveContent: false
}; };
const currentViews = 1284257550; const currentViews = 49816;
describe("innertube API test", function() { describe("innertube API test", function() {
it("should be able to get innerTube details", async () => { it("should be able to get innerTube details", async () => {