[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: Improve ytm test suite speed

FoxxMD (May 11, 2026, 4:22 PM UTC) 019133d7 303cb4b1

+3 -4
+3 -4
src/backend/tests/ytm/ytm.test.ts
··· 28 28 } = opts || {}; 29 29 const source = new YTMusicSource('test', config, { localUrl: new URL('https://example.com'), configDir: 'fake', logger: loggerTest, version: 'test' }, emitter); 30 30 await source.buildDatabase(); 31 - source.buildTransformRules(); 32 31 return source; 33 32 } 34 33 ··· 140 139 const prependedPlays = [newPlay, ...plays]; 141 140 expect(source.parseRecentAgainstResponse(prependedPlays).plays).length(1); 142 141 143 - await sleep(1000); 142 + await sleep(50); 144 143 145 144 // YT returns outdated history 146 145 // should be detected as append since "removed" track in last position from previous history is seen again ··· 148 147 expect(badAppend).to.deep.include({consistent: false, diffType: 'added', plays: []}); 149 148 expect(badAppend.diffResults[2]).eq('append'); 150 149 151 - await sleep(500); 150 + await sleep(10); 152 151 153 152 // contiuned outdated history 154 153 expect(source.parseRecentAgainstResponse(plays)).to.deep.include({consistent: true, plays: []}); 155 154 156 - await sleep(500); 155 + await sleep(10); 157 156 158 157 // correct, current history is finally returned correctly 159 158 const recentHistoryResult = source.parseRecentAgainstResponse(prependedPlays);