test(tmdb): cover combined overview+trailer fallback fill

Adds the missing case where the primary payload lacks both overview and
trailer and the fallback supplies both — the two fill branches are
independent (greptile).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Fable 5 committed 2026-07-06 19:33:03 +02:00
1 parent dae6beea88
commit 5d97b72473
1 file changed
+9
@@ -70,6 +70,15 @@ describe('fillDetailsFromFallback', () => {
expect(merged.overview).toBe('English plot');
});
it('fills both overview and trailer when the primary payload has neither', () => {
const merged = fillDetailsFromFallback(
{ id: 1, overview: '', original_language: 'ru' },
{ id: 1, overview: 'Русское описание', videos }
);
expect(merged.overview).toBe('Русское описание');
expect(merged.videos?.results?.[0].key).toBe('abc123');
});
it('fills the trailer when the primary payload has none', () => {
const merged = fillDetailsFromFallback(
{ id: 1, overview: 'English plot' },