aboutsummaryrefslogtreecommitdiff
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.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/packages/astro-rss/test/rss.test.js b/packages/astro-rss/test/rss.test.js
index 744471f8c..d519d19ca 100644
--- a/packages/astro-rss/test/rss.test.js
+++ b/packages/astro-rss/test/rss.test.js
@@ -107,7 +107,6 @@ describe('rss', () => {
const { body } = await rss({
title,
description,
- drafts: true,
items: [phpFeedItem, { ...web1FeedItem, draft: true }],
site,
drafts: true,
@@ -116,6 +115,20 @@ describe('rss', () => {
chai.expect(body).xml.to.equal(validXmlResult);
});
+ it('should not append trailing slash to URLs with the given option', async () => {
+ const { body } = await rss({
+ title,
+ description,
+ items: [phpFeedItem, { ...web1FeedItem, draft: true }],
+ site,
+ drafts: true,
+ trailingSlash: false,
+ });
+
+ chai.expect(body).xml.to.contain('https://example.com/<');
+ chai.expect(body).xml.to.contain('https://example.com/php<');
+ });
+
it('Deprecated import.meta.glob mapping still works', async () => {
const globResult = {
'./posts/php.md': () =>