test("correctly fetches a list of countries", (done) => { //arrange const inputLanguageCode = "es" const expectedValue ="Argentina" //act countryListLookup(inputLanguageCode, (result) =>{ //assertions try{ expect(result).toBeDefined(); done(); } catch(error){ done(error) } }); });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter