This commit is contained in:
TowyTowy 2026-07-10 06:51:24 +02:00 committed by GitHub
commit 2bd29ee6c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 2 deletions

View file

@ -45,4 +45,22 @@ describe('Audible', () => {
expect(result).to.equal('.5')
})
})
describe('cleanResult', () => {
it('should decode HTML entities in the title and subtitle (#5340)', () => {
const result = audible.cleanResult({
title: 'The "Hitler" Myth',
subtitle: 'Image & Reality in the Third Reich',
asin: 'B0TESTASIN'
})
expect(result.title).to.equal('The "Hitler" Myth')
expect(result.subtitle).to.equal('Image & Reality in the Third Reich')
})
it('should keep a null subtitle when none is provided', () => {
const result = audible.cleanResult({ title: 'A Plain Title', asin: 'B0TESTASIN' })
expect(result.title).to.equal('A Plain Title')
expect(result.subtitle).to.equal(null)
})
})
})