lib/services/__tests__/movie.spec.js
const movie = require('../movie')
const tmdb = require('../tmdb')
jest.mock('../tmdb', () => ({
info: jest.fn().mockReturnValue(
Promise.resolve({
adult: false,
backdrop_path: '/mVr0UiqyltcfqxbAUcLl9zWL8ah.jpg',
belongs_to_collection: {
id: 422837,
name: 'Blade Runner Collection',
poster_path: '/foT46aJ7QPUFDl3CK8ArDl0JaZX.jpg',
backdrop_path: '/57zhlMYblPute6qb8v16ZmGSPVv.jpg',
},
budget: 150000000,
genres: [
{ id: 28, name: 'Action' },
{ id: 9648, name: 'Mystery' },
{ id: 878, name: 'Science Fiction' },
{ id: 53, name: 'Thriller' },
],
homepage: 'http://bladerunnermovie.com/',
id: 335984,
imdb_id: 'tt1856101',
original_language: 'en',
original_title: 'Blade Runner 2049',
overview:
'Thirty years after the events of the first film, a new blade runner, LAPD Officer K, unearths a long-buried secret that has the potential to plunge what\'s left of society into chaos. K\'s discovery leads him on a quest to find Rick Deckard, a former LAPD blade runner who has been missing for 30 years.',
popularity: 443.770778,
poster_path: '/aMpyrCizvSdc0UIMblJ1srVgAEF.jpg',
production_companies: [
{ name: 'Alcon Entertainment', id: 1088 },
{ name: 'Scott Free Productions', id: 1645 },
{ name: 'Warner Bros.', id: 6194 },
{ name: 'Thunderbird Films', id: 78028 },
{ name: 'Torridon Films', id: 79529 },
],
production_countries: [
{ iso_3166_1: 'US', name: 'United States of America' },
],
release_date: '2017-10-04',
revenue: 156551405,
runtime: 163,
spoken_languages: [{ iso_639_1: 'en', name: 'English' }],
status: 'Released',
tagline: '',
title: 'Blade Runner 2049',
video: false,
vote_average: 7.7,
vote_count: 986,
})
),
credits: jest.fn().mockReturnValue(
Promise.resolve({
id: 335984,
cast: [
{
cast_id: 14,
character: 'Officer K',
credit_id: '575d7fb69251414a82004702',
gender: 2,
id: 30614,
name: 'Ryan Gosling',
order: 0,
profile_path: '/4X1wJo5xHm3YICPWZqVCPgLBEJ7.jpg',
},
{
cast_id: 16,
character: 'Rick Deckard',
credit_id: '575d7fc7c3a36831a40043e6',
gender: 2,
id: 3,
name: 'Harrison Ford',
order: 1,
profile_path: '/7CcoVFTogQgex2kJkXKMe8qHZrC.jpg',
},
{
cast_id: 18,
character: 'Joi',
credit_id: '575d7fd6c3a368451600115b',
gender: 1,
id: 224513,
name: 'Ana de Armas',
order: 2,
profile_path: '/xPYOkcMaAEdoTWp6pme056WqhFW.jpg',
},
{
cast_id: 15,
character: 'Lieutenant Joshi',
credit_id: '575d7fbd92514103e800009f',
gender: 1,
id: 32,
name: 'Robin Wright',
order: 3,
profile_path: '/tXfQTgcIEPP7gtVdJ44ZxZPhacn.jpg',
},
{
cast_id: 104,
character: 'Niander Wallace',
credit_id: '57e76841925141414601061b',
gender: 2,
id: 7499,
name: 'Jared Leto',
order: 4,
profile_path: '/msugySeTCyCmlRWtyB6sMixTQYY.jpg',
},
{
cast_id: 19,
character: 'Luv',
credit_id: '575d7fdd925141540300091c',
gender: 1,
id: 104632,
name: 'Sylvia Hoeks',
order: 5,
profile_path: '/huzjezIwcBePLkKvd1mOKghhF94.jpg',
},
{
cast_id: 20,
character: 'Mariette',
credit_id: '575d7fe592514104230000ae',
gender: 1,
id: 1110405,
name: 'Mackenzie Davis',
order: 6,
profile_path: '/zacHW7kY4XK7nZnMpiuEsRrQCdU.jpg',
},
{
cast_id: 21,
character: 'Dr. Ana Stelline',
credit_id: '575d7fecc3a36831a40043ee',
gender: 1,
id: 1013973,
name: 'Carla Juri',
order: 7,
profile_path: '/e3fMoi1Qqfe9JEOu3ubvHzs07EW.jpg',
},
{
cast_id: 17,
character: 'Sapper Morton',
credit_id: '575d7fce925141189e001471',
gender: 2,
id: 543530,
name: 'Dave Bautista',
order: 8,
profile_path: '/mR7ZdtykA2MvT6ZCZtM4pjXW1gA.jpg',
},
{
cast_id: 99,
character: 'Mister Cotton',
credit_id: '579a3f939251411328003a68',
gender: 2,
id: 1120,
name: 'Lennie James',
order: 9,
profile_path: '/ilmHrtWZMa7FP3yCyJoHX6sSZjx.jpg',
},
{
cast_id: 58,
character: 'Freysa',
credit_id: '5790caebc3a36865eb00965a',
gender: 1,
id: 765,
name: 'Hiam Abbass',
order: 10,
profile_path: '/hkzC5aJKTiuCchBpybaHDVngYZW.jpg',
},
{
cast_id: 57,
character: 'Coco',
credit_id: '5790cae49251414b32004b2c',
gender: 2,
id: 83854,
name: 'David Dastmalchian',
order: 11,
profile_path: '/3cdrnfthY40ZsIhq1FBEwGJq9mE.jpg',
},
{
cast_id: 56,
character: 'Doc Badger',
credit_id: '5790cadb9251416bb400174b',
gender: 0,
id: 1261694,
name: 'Barkhad Abdi',
order: 12,
profile_path: '/utfeg8GnGyW3aVNcRfhII9RCXB6.jpg',
},
{
cast_id: 134,
character: 'Nandez',
credit_id: '59d0ff15c3a368792901f225',
gender: 2,
id: 65829,
name: 'Wood Harris',
order: 13,
profile_path: '/u88haG6iG7zwV0PTk9tSG5obaeP.jpg',
},
{
cast_id: 141,
character: 'File Clerk',
credit_id: '59d7193692514124c50076e5',
gender: 2,
id: 18818,
name: 'Tómas Lemarquis',
order: 14,
profile_path: '/6qWyGbPWE020wTezwoWx1wIPuPQ.jpg',
},
{
cast_id: 106,
character: 'Gaff',
credit_id: '58c7f555c3a3683df300ebb6',
gender: 2,
id: 587,
name: 'Edward James Olmos',
order: 15,
profile_path: '/i7zKqsFqL5L1HPmAMeSA1xZzlD5.jpg',
},
{
cast_id: 142,
character: 'Rachael',
credit_id: '59d71988c3a36861ec0075ad',
gender: 1,
id: 586,
name: 'Sean Young',
order: 16,
profile_path: '/4zgkRFQruIlaJ4JakNZLoKJ70fH.jpg',
},
{
cast_id: 135,
character: 'Interviewer',
credit_id: '59d0ff3792514114520205d7',
gender: 2,
id: 119893,
name: 'Mark Arnold',
order: 17,
profile_path: null,
},
{
cast_id: 132,
character: 'Doxie #2',
credit_id: '59bd9a579251413525018b41',
gender: 1,
id: 72482,
name: 'Krista Kosonen',
order: 18,
profile_path: '/j9YVSj4l21oafFe66s7QAVgkxo.jpg',
},
{
cast_id: 133,
character: 'Doxie #3',
credit_id: '59d0fee69251411452020546',
gender: 1,
id: 1635050,
name: 'Elarica Johnson',
order: 19,
profile_path: '/6SX4n4rjaM4NJOgucxIwZ6l92zb.jpg',
},
{
cast_id: 108,
character: 'Boy with One Ear',
credit_id: '5912d5b7c3a36864ec04c406',
gender: 0,
id: 1813834,
name: 'Kingston Taylor',
order: 20,
profile_path: null,
},
{
cast_id: 105,
character: 'Liberace Look-A-Like',
credit_id: '58265038c3a368360b0104b3',
gender: 0,
id: 1380395,
name: 'David Benson',
order: 21,
profile_path: null,
},
{
cast_id: 136,
character: 'Elvis Look-A-Like',
credit_id: '59d0ff69925141468f015aba',
gender: 0,
id: 1898019,
name: 'Ben Thompson',
order: 22,
profile_path: null,
},
{
cast_id: 137,
character: 'Marilyn Look-A-Like',
credit_id: '59d0ffa4925141142f01fbe2',
gender: 0,
id: 1148965,
name: 'Suzie Kennedy',
order: 23,
profile_path: null,
},
{
cast_id: 138,
character: 'Sinatra Look-A-Like',
credit_id: '59d0ffd1925141468f015b8e',
gender: 0,
id: 1898020,
name: 'Stephen Triffitt',
order: 24,
profile_path: null,
},
{
cast_id: 107,
character: 'Little Ellie',
credit_id: '5912d5a5c3a36864d40537f8',
gender: 0,
id: 1813833,
name: 'Ellie Wright',
order: 25,
profile_path: null,
},
{
cast_id: 143,
character: 'Rachel double',
credit_id: '59d85140c3a368620001f20f',
gender: 0,
id: 1901526,
name: 'Loren Peta',
order: 26,
profile_path: null,
},
],
crew: [
{
credit_id: '552f0514c3a368220e0002d2',
department: 'Directing',
gender: 2,
id: 137427,
job: 'Director',
name: 'Denis Villeneuve',
profile_path: '/433lXlkdMGXzrpwnKM4Ul1sln15.jpg',
},
{
credit_id: '55311ec6c3a3684112002601',
department: 'Writing',
gender: 2,
id: 584,
job: 'Novel',
name: 'Philip K. Dick',
profile_path: '/jDOKJN8SQ17QsJ7omv4yBNZi7XY.jpg',
},
{
credit_id: '55311ee2c3a3680a940022d1',
department: 'Writing',
gender: 2,
id: 583,
job: 'Story',
name: 'Hampton Fancher',
profile_path: '/lrGecnLhzjzgwjKHvrmYtRAqOsP.jpg',
},
{
credit_id: '55311eedc3a36841250026a4',
department: 'Writing',
gender: 2,
id: 583,
job: 'Screenplay',
name: 'Hampton Fancher',
profile_path: '/lrGecnLhzjzgwjKHvrmYtRAqOsP.jpg',
},
{
credit_id: '556e6bbb925141157d00070f',
department: 'Camera',
gender: 2,
id: 151,
job: 'Director of Photography',
name: 'Roger Deakins',
profile_path: '/osGe7eLKNIErFLn1RHJDeYTYOmb.jpg',
},
{
credit_id: '5725289bc3a368305a001789',
department: 'Writing',
gender: 2,
id: 191937,
job: 'Screenplay',
name: 'Michael Green',
profile_path: '/d6Yn0FM016tQefUDpPIFheCdLZ7.jpg',
},
{
credit_id: '575d8009c3a36836e50000e8',
department: 'Production',
gender: 0,
id: 17219,
job: 'Co-Producer',
name: 'Dana Belcastro',
profile_path: null,
},
{
credit_id: '575d8015c3a3681318002658',
department: 'Production',
gender: 2,
id: 23420,
job: 'Executive Producer',
name: 'Bill Carraro',
profile_path: null,
},
{
credit_id: '575d8037c3a36837910000d2',
department: 'Production',
gender: 0,
id: 1121571,
job: 'Executive Producer',
name: 'Tim Gamble',
profile_path: null,
},
{
credit_id: '575d807ec3a36837310000fe',
department: 'Production',
gender: 0,
id: 1634532,
job: 'Executive Producer',
name: 'Frank Giustra',
profile_path: null,
},
{
credit_id: '575d808fc3a36836e5000110',
department: 'Production',
gender: 2,
id: 47285,
job: 'Producer',
name: 'Broderick Johnson',
profile_path: null,
},
{
credit_id: '575d809ec3a36836e5000113',
department: 'Production',
gender: 2,
id: 47286,
job: 'Producer',
name: 'Andrew A. Kosove',
profile_path: null,
},
{
credit_id: '575d80aa92514104230000d8',
department: 'Production',
gender: 0,
id: 1399695,
job: 'Co-Producer',
name: 'Carl Rogers',
profile_path: null,
},
{
credit_id: '575d80b5925141189e0014c1',
department: 'Production',
gender: 2,
id: 578,
job: 'Producer',
name: 'Ridley Scott',
profile_path: '/oTAL0z0vsjipCruxXUsDUIieuhk.jpg',
},
{
credit_id: '575d80c692514103e80000c9',
department: 'Production',
gender: 1,
id: 96765,
job: 'Producer',
name: 'Cynthia Sikes',
profile_path: '/quFlIHnZDU2PcbDEhTtkE9lzS4h.jpg',
},
{
credit_id: '575d80d1c3a3681351002cca',
department: 'Production',
gender: 2,
id: 956249,
job: 'Co-Producer',
name: 'Steven P. Wegner',
profile_path: null,
},
{
credit_id: '575d80da92514124430027c6',
department: 'Production',
gender: 2,
id: 69946,
job: 'Producer',
name: 'Bud Yorkin',
profile_path: '/rJLTs2Z8YHV0VzgKGlVQ53XBH7q.jpg',
},
{
credit_id: '575d80f0c3a36879bb000852',
department: 'Production',
gender: 1,
id: 6410,
job: 'Casting',
name: 'Francine Maisler',
profile_path: '/7kOKhRSuwDXqyd2Dm2xdWdi18lQ.jpg',
},
{
credit_id: '575d80fc925141536d00090b',
department: 'Costume & Make-Up',
gender: 0,
id: 1315700,
job: 'Makeup Department Head',
name: 'Donald Mowat',
profile_path: null,
},
{
credit_id: '575d810c92514103e80000de',
department: 'Production',
gender: 0,
id: 76675,
job: 'Production Supervisor',
name: 'Gavin J. Behrman',
profile_path: null,
},
{
credit_id: '575d813292514103e80000ea',
department: 'Crew',
gender: 2,
id: 13458,
job: 'Second Unit',
name: 'Joel Kramer',
profile_path: null,
},
{
credit_id: '575d81419251414a82004767',
department: 'Directing',
gender: 2,
id: 1519868,
job: 'Assistant Director',
name: 'Donald Sparks',
profile_path: null,
},
{
credit_id: '575d819c9251415dd2003544',
department: 'Art',
gender: 0,
id: 1335873,
job: 'Conceptual Design',
name: 'George Hull',
profile_path: null,
},
{
credit_id: '575d81b792514124430027f4',
department: 'Art',
gender: 0,
id: 1634535,
job: 'Conceptual Design',
name: 'Scott Lukowski',
profile_path: null,
},
{
credit_id: '59d8f49892514124c90290fd',
department: 'Sound',
gender: 0,
id: 16177,
job: 'Sound Re-Recording Mixer',
name: 'Ron Bartlett',
profile_path: null,
},
{
credit_id: '575d81d79251415dd2003550',
department: 'Visual Effects',
gender: 0,
id: 1392908,
job: 'Visual Effects Producer',
name: 'Karen M. Murphy',
profile_path: null,
},
{
credit_id: '575d81ee925141189e0014f5',
department: 'Visual Effects',
gender: 0,
id: 1456374,
job: 'Visual Effects Supervisor',
name: 'John Nelson',
profile_path: null,
},
{
credit_id: '575d81fa925141189e0014f7',
department: 'Crew',
gender: 0,
id: 1445583,
job: 'Stunts',
name: 'Adam Hart',
profile_path: '/dEBsG7444cq5DjKv4UBCvZMOso4.jpg',
},
{
credit_id: '575d8204925141189e0014f9',
department: 'Crew',
gender: 2,
id: 13458,
job: 'Stunt Coordinator',
name: 'Joel Kramer',
profile_path: null,
},
{
credit_id: '575d821e9251414a820047b4',
department: 'Crew',
gender: 0,
id: 1634536,
job: 'Editorial Staff',
name: 'Daniel Czinkota',
profile_path: null,
},
{
credit_id: '575d822c925141536d000934',
department: 'Crew',
gender: 0,
id: 1450342,
job: 'Editorial Staff',
name: 'Ken Lebre',
profile_path: null,
},
{
credit_id: '575d824cc3a3683791000142',
department: 'Production',
gender: 0,
id: 1634537,
job: 'Location Manager',
name: 'Zsolt Molnar',
profile_path: null,
},
{
credit_id: '575d829b92514103e8000133',
department: 'Production',
gender: 0,
id: 1408369,
job: 'Location Manager',
name: 'Emma Pill',
profile_path: null,
},
{
credit_id: '575d82ec9251414a820047df',
department: 'Crew',
gender: 0,
id: 1225727,
job: 'Production Controller',
name: 'Joshua Ravetch',
profile_path: null,
},
{
credit_id: '575d82fac3a3681351002d38',
department: 'Crew',
gender: 0,
id: 1634540,
job: 'Prop Maker',
name: 'Peter Tindall',
profile_path: null,
},
{
credit_id: '5790ccbe9251410c06006598',
department: 'Production',
gender: 1,
id: 1113,
job: 'Casting',
name: 'Lucinda Syson',
profile_path: null,
},
{
credit_id: '5790cd279251416bb40017e3',
department: 'Costume & Make-Up',
gender: 0,
id: 1653963,
job: 'Other',
name: 'Csilla Blake-Horváth',
profile_path: null,
},
{
credit_id: '5790cd349251416bb40017e9',
department: 'Costume & Make-Up',
gender: 0,
id: 1364792,
job: 'Makeup Artist',
name: 'Jo-Ann MacNeil',
profile_path: null,
},
{
credit_id: '5790cd74c3a3685b2600ac83',
department: 'Crew',
gender: 0,
id: 1653964,
job: 'Property Master',
name: 'Brad Good',
profile_path: null,
},
{
credit_id: '5790cd8cc3a36865eb009715',
department: 'Art',
gender: 0,
id: 1357046,
job: 'Conceptual Design',
name: 'Victor James Martinez',
profile_path: null,
},
{
credit_id: '5790cd94c3a3681d240016dd',
department: 'Art',
gender: 0,
id: 575766,
job: 'Conceptual Design',
name: 'Ed Natividad',
profile_path: null,
},
{
credit_id: '5790cd9d9251416bb4001817',
department: 'Art',
gender: 0,
id: 40757,
job: 'Conceptual Design',
name: 'Peter Popken',
profile_path: null,
},
{
credit_id: '5790cdaa9251414b32004c03',
department: 'Art',
gender: 0,
id: 1335874,
job: 'Conceptual Design',
name: 'Emmanuel Shiu',
profile_path: null,
},
{
credit_id: '5790cfe49251416bb40018cf',
department: 'Visual Effects',
gender: 0,
id: 1530231,
job: 'Special Effects Supervisor',
name: 'Gerd Nefzer',
profile_path: null,
},
{
credit_id: '5790cffdc3a3684a8c004eb0',
department: 'Visual Effects',
gender: 0,
id: 1653978,
job: 'Pyrotechnic Supervisor',
name: 'Marcus Preussing',
profile_path: null,
},
{
credit_id: '5790d00dc3a3681cb1001c30',
department: 'Visual Effects',
gender: 0,
id: 1653979,
job: 'Special Effects Supervisor',
name: 'Bernd Rautenberg',
profile_path: null,
},
{
credit_id: '5790d0829251416b280019b9',
department: 'Crew',
gender: 0,
id: 1653985,
job: 'Supervising Technical Director',
name: 'Carsten Woithe',
profile_path: null,
},
{
credit_id: '5790d12d9251414b32004d33',
department: 'Visual Effects',
gender: 0,
id: 1590412,
job: 'Visual Effects Supervisor',
name: 'Huseyin Caner',
profile_path: null,
},
{
credit_id: '5790d1679251410c06006734',
department: 'Visual Effects',
gender: 0,
id: 1653986,
job: 'Visual Development',
name: 'Nikul Patel',
profile_path: null,
},
{
credit_id: '5790d1b89251416b02001a0b',
department: 'Costume & Make-Up',
gender: 0,
id: 1447628,
job: 'Set Costumer',
name: 'Mark Avery',
profile_path: null,
},
{
credit_id: '5790d1fc9251410c0600677a',
department: 'Crew',
gender: 0,
id: 1479280,
job: 'Sets & Props Supervisor',
name: 'Isabel Bloor',
profile_path: null,
},
{
credit_id: '5790d2939251416b58001c73',
department: 'Editing',
gender: 0,
id: 1634466,
job: 'Color Timer',
name: 'Matt Wallach',
profile_path: null,
},
{
credit_id: '5790d2d29251416b02001a79',
department: 'Production',
gender: 0,
id: 1394315,
job: 'Location Manager',
name: 'Rudolf András',
profile_path: null,
},
{
credit_id: '57c2cce99251410d3f0067fe',
department: 'Crew',
gender: 0,
id: 1634538,
job: 'Production Office Assistant',
name: 'Rachel Amanda Alterman',
profile_path: null,
},
{
credit_id: '57c2ce17925141416300078f',
department: 'Crew',
gender: 0,
id: 40804,
job: 'Special Effects Coordinator',
name: 'Klaus Mielich',
profile_path: null,
},
{
credit_id: '57d598a59251411329001a45',
department: 'Editing',
gender: 0,
id: 999565,
job: 'Editor',
name: 'Joe Walker',
profile_path: '/7h6OwHeqWSpWPnsXR8XJAEGkxm4.jpg',
},
{
credit_id: '59d5446d9251414b4501d233',
department: 'Sound',
gender: 2,
id: 947,
job: 'Original Music Composer',
name: 'Hans Zimmer',
profile_path: '/7IjJpvGtCfY0DsritmfCh2iX9I4.jpg',
},
{
credit_id: '5912d61ec3a368651904be1c',
department: 'Production',
gender: 0,
id: 49670,
job: 'Casting',
name: 'Zsolt Csutak',
profile_path: null,
},
{
credit_id: '5912d6319251414ead04e108',
department: 'Art',
gender: 2,
id: 4248,
job: 'Production Design',
name: 'Dennis Gassner',
profile_path: null,
},
{
credit_id: '5912d6409251414e8d04f3b4',
department: 'Art',
gender: 0,
id: 1394119,
job: 'Art Direction',
name: 'David Doran',
profile_path: null,
},
{
credit_id: '5912d64bc3a368650a04ee9b',
department: 'Art',
gender: 0,
id: 1329411,
job: 'Art Direction',
name: 'Bence Erdelyi',
profile_path: null,
},
{
credit_id: '5912d6559251414e9205205d',
department: 'Art',
gender: 0,
id: 1551809,
job: 'Art Direction',
name: 'Lydia Fry',
profile_path: null,
},
{
credit_id: '5912d666c3a36864a704fe4d',
department: 'Art',
gender: 2,
id: 30463,
job: 'Supervising Art Director',
name: 'Paul Inglis',
profile_path: null,
},
{
credit_id: '5912d671c3a368651904be41',
department: 'Art',
gender: 0,
id: 1013552,
job: 'Art Direction',
name: 'Tibor Lázár',
profile_path: null,
},
{
credit_id: '5912d6819251414e8d04f3dd',
department: 'Art',
gender: 0,
id: 1548941,
job: 'Art Direction',
name: 'Gergely Rieger',
profile_path: null,
},
{
credit_id: '5912d693c3a368651904be54',
department: 'Art',
gender: 2,
id: 1411329,
job: 'Art Direction',
name: 'Stefan Speth',
profile_path: null,
},
{
credit_id: '5912d69f9251414e85051cd0',
department: 'Art',
gender: 0,
id: 25063,
job: 'Set Decoration',
name: 'Alessandra Querzola',
profile_path: null,
},
{
credit_id: '5912d6b0c3a36864ec04c4ac',
department: 'Costume & Make-Up',
gender: 1,
id: 6057,
job: 'Costume Design',
name: 'Renée April',
profile_path: null,
},
{
credit_id: '5912d6bec3a368651904be71',
department: 'Costume & Make-Up',
gender: 0,
id: 1726048,
job: 'Makeup Artist',
name: 'Anna Törjék',
profile_path: null,
},
{
credit_id: '5912d6cd9251414e80051d3e',
department: 'Costume & Make-Up',
gender: 0,
id: 1635484,
job: 'Hairstylist',
name: 'Jaime Leigh McIntosh',
profile_path: null,
},
{
credit_id: '5912d6dd9251414e80051d4a',
department: 'Costume & Make-Up',
gender: 0,
id: 1653963,
job: 'Makeup Supervisor',
name: 'Csilla Blake-Horváth',
profile_path: null,
},
{
credit_id: '5912d6ecc3a36864d40538c7',
department: 'Costume & Make-Up',
gender: 0,
id: 1334806,
job: 'Hair Supervisor',
name: 'Lizzie Lawson',
profile_path: null,
},
{
credit_id: '5912d6fe9251414e80051d5d',
department: 'Directing',
gender: 0,
id: 1813843,
job: 'First Assistant Director',
name: 'Gábor Hegedüs Hege',
profile_path: null,
},
{
credit_id: '5912d70d9251414e8d04f43f',
department: 'Directing',
gender: 2,
id: 1519868,
job: 'First Assistant Director',
name: 'Donald Sparks',
profile_path: null,
},
{
credit_id: '5912d723c3a368651904bebe',
department: 'Directing',
gender: 2,
id: 13458,
job: 'Second Assistant Director',
name: 'Joel Kramer',
profile_path: null,
},
{
credit_id: '5912d74a9251414eca04edb1',
department: 'Sound',
gender: 0,
id: 1392131,
job: 'Sound Effects Editor',
name: 'Christopher S. Aud',
profile_path: null,
},
{
credit_id: '5912d7669251414eca04edcc',
department: 'Sound',
gender: 0,
id: 1784639,
job: 'Production Sound Mixer',
name: 'Mac Ruth',
profile_path: null,
},
{
credit_id: '5912d78cc3a36864c6051466',
department: 'Editing',
gender: 0,
id: 1813847,
job: 'Assistant Editor',
name: 'Zach Marshall',
profile_path: null,
},
{
credit_id: '5912d7abc3a36864fc050f34',
department: 'Editing',
gender: 0,
id: 1812638,
job: 'Assistant Editor',
name: 'Balázs Budai',
profile_path: null,
},
{
credit_id: '5913da47c3a36842690046c7',
department: 'Production',
gender: 2,
id: 578,
job: 'Executive Producer',
name: 'Ridley Scott',
profile_path: '/oTAL0z0vsjipCruxXUsDUIieuhk.jpg',
},
{
credit_id: '59d544a7c3a368455001ef0b',
department: 'Sound',
gender: 2,
id: 40825,
job: 'Original Music Composer',
name: 'Benjamin Wallfisch',
profile_path: null,
},
{
credit_id: '59d8f4a692514124cd0295a5',
department: 'Sound',
gender: 2,
id: 1360099,
job: 'Sound Effects Editor',
name: 'Lee Gilmore',
profile_path: '/m3J8KCmSZ2ByrV4gHlbhw9zec2J.jpg',
},
{
credit_id: '59d8f4b492514124c50291cc',
department: 'Sound',
gender: 0,
id: 1099886,
job: 'Sound Designer',
name: 'Theo Green',
profile_path: null,
},
{
credit_id: '59d8f4c0c3a3686200029aab',
department: 'Sound',
gender: 2,
id: 1377220,
job: 'Sound Re-Recording Mixer',
name: 'Doug Hemphill',
profile_path: null,
},
{
credit_id: '59d8f4d2c3a36861ec028eb2',
department: 'Sound',
gender: 2,
id: 8376,
job: 'Supervising Sound Editor',
name: 'Mark A. Mangini',
profile_path: null,
},
{
credit_id: '59d8f4e292514124eb028589',
department: 'Sound',
gender: 0,
id: 1433721,
job: 'Sound Effects Editor',
name: 'Greg ten Bosch',
profile_path: null,
},
],
})
),
}))
describe('#movie', () => {
it('should get movie information', async () => {
try {
await movie('tt1856101')
expect(tmdb.info).toHaveBeenCalledWith('tt1856101')
} catch (e) {
throw new Error(e)
}
})
it('should get movie credits', () => {
movie('tt1333337')
expect(tmdb.credits).toHaveBeenCalledWith('tt1856101')
})
it('should return a completed movie', async () => {
try {
const result = await movie('tt1333337')
expect(result).toMatchSnapshot()
} catch (e) {
throw new Error(e)
}
})
})