mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-12 03:56:15 -08:00
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:
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' },
|
||||
|
||||
Reference in new issue
Block a user