diff options
author | 2024-02-04 14:42:26 -0500 | |
---|---|---|
committer | 2024-02-04 20:42:26 +0100 | |
commit | 8b8f26fdf2af2a769f4846bdaaf4cf6b30f9e37c (patch) | |
tree | f962c18f16bb2bd0bf6d136fe3747913d40034fb /packages/astro-rss/test/rss.test.js | |
parent | 57ab98f53148cb00174ca6ddeea3cfc7404f0f22 (diff) | |
download | astro-8b8f26fdf2af2a769f4846bdaaf4cf6b30f9e37c.tar.gz astro-8b8f26fdf2af2a769f4846bdaaf4cf6b30f9e37c.tar.zst astro-8b8f26fdf2af2a769f4846bdaaf4cf6b30f9e37c.zip |
FIX: allow rss feeds to have an enclosure with length of 0 (#9967)
* fix: allow rss feeds to have an enclosure with length of 0
* chore: add changeset
* fix: typo on test
* fix: update changeset description
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
---------
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
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; + }); }); |