diff options
Diffstat (limited to 'packages/astro-rss/test/rss.test.js')
-rw-r--r-- | packages/astro-rss/test/rss.test.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/astro-rss/test/rss.test.js b/packages/astro-rss/test/rss.test.js index 833abf91c..d32c420f1 100644 --- a/packages/astro-rss/test/rss.test.js +++ b/packages/astro-rss/test/rss.test.js @@ -227,4 +227,27 @@ describe('getRssString', () => { } chai.expect(error).to.be.null; }); + + it('should not fail when an enclosure has a length of 0', async () => { + const str = await getRssString({ + title, + description, + items: [ + { + title: 'Title', + pubDate: new Date().toISOString(), + description: 'Description', + link: '/link', + enclosure: { + url: '/enclosure', + length: 0, + type: 'audio/mpeg', + }, + }, + ], + site, + }); + + chai.expect(str).to.not.throw; + }); }); |