summaryrefslogtreecommitdiff
path: root/packages/astro-rss/test/rss.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/astro-rss/test/rss.test.js')
-rw-r--r--packages/astro-rss/test/rss.test.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/astro-rss/test/rss.test.js b/packages/astro-rss/test/rss.test.js
index d519d19ca..be4362a34 100644
--- a/packages/astro-rss/test/rss.test.js
+++ b/packages/astro-rss/test/rss.test.js
@@ -92,6 +92,23 @@ describe('rss', () => {
chai.expect(body).xml.to.equal(validXmlWithXSLStylesheet);
});
+ it('should preserve self-closing tags on `customData`', async () => {
+ const customData =
+ '<atom:link href="https://example.com/feed.xml" rel="self" type="application/rss+xml"/>';
+ const { body } = await rss({
+ title,
+ description,
+ items: [],
+ site,
+ xmlns: {
+ atom: 'http://www.w3.org/2005/Atom',
+ },
+ customData,
+ });
+
+ chai.expect(body).to.contain(customData);
+ });
+
it('should filter out entries marked as `draft`', async () => {
const { body } = await rss({
title,