[READ-ONLY] Mirror of https://github.com/FoxxMD/multi-scrobbler. Scrobble plays from multiple sources to multiple clients docs.multi-scrobbler.app
deezer docker jellyfin koito lastfm listenbrainz maloja mopidy mpris music music-assistant plex scrobble self-hosted spotify subsonic tautulli youtube-music
0

Configure Feed

Select the types of activity you want to include in your feed.

test(ytm): Fix failing type assertion

FoxxMD (Sep 2, 2025, 12:24 PM UTC) 7068da5f 3704fba1

+4 -3
+4 -3
src/backend/tests/ytm/ytm.test.ts
··· 4 4 import asPromised from 'chai-as-promised'; 5 5 import clone from "clone"; 6 6 import YTMusicSource, { ytiHistoryResponseFromShelfToPlays, ytiHistoryResponseToListItems } from "../../sources/YTMusicSource.js"; 7 - import ytHistoryRes from './ytres.json' assert {type: 'json'}; 7 + import ytHistoryRes from './ytres.json' with {type: 'json'}; 8 8 import EventEmitter from "events"; 9 9 import { generatePlay, generatePlays, normalizePlays } from '../utils/PlayTestUtils.js'; 10 10 import { YTMusicSourceConfig } from '../../common/infrastructure/config/source/ytmusic.js'; 11 11 import { sleep } from '../../utils.js'; 12 12 import dayjs from 'dayjs'; 13 + import { ApiResponse } from 'youtubei.js'; 13 14 14 15 chai.use(asPromised); 15 16 ··· 33 34 describe('Parses History', function () { 34 35 35 36 it(`Parses a history response to tracks`, async function () { 36 - const items = ytiHistoryResponseToListItems(ytHistoryRes); 37 + const items = ytiHistoryResponseToListItems(ytHistoryRes as ApiResponse); 37 38 expect(items).length(10); 38 39 }); 39 40 40 41 it(`Parses a history response plays with shelf name`, async function () { 41 - const items = ytiHistoryResponseFromShelfToPlays(ytHistoryRes); 42 + const items = ytiHistoryResponseFromShelfToPlays(ytHistoryRes as ApiResponse); 42 43 expect(items[0]?.meta?.comment).to.eq('March 2023'); 43 44 }); 44 45 });