describe('cleanTone', () => { it('should return the expected array of tone objects', () => { const result = cleanTone(mockUncleaned.sentences_tone[0], 0.2) const expected = mockCleaned.sentences[0].tones expect(result).toEqual(expected) }) })
return cb(err, null); } else { var emotions = tone.result.document_tone.tone_categories[0].tones; var mood = _.max(emotions, (emotion) => emotion.score); if (mood.score !== 0) {