summaryrefslogtreecommitdiff
path: root/packages/astro-rss/test/test-utils.js
diff options
context:
space:
mode:
authorGravatar Armand Philippot <git@armand.philippot.eu> 2024-10-07 17:42:19 +0200
committerGravatar GitHub <noreply@github.com> 2024-10-07 11:42:19 -0400
commit50dd88bc6611243e3f1b2df643af6d0b551fe140 (patch)
treeb19d2673c4386db2e4f7e01cc7abc6bacbb37402 /packages/astro-rss/test/test-utils.js
parent2385d58389ee975a53f4089f2a7220d97cf3cdff (diff)
downloadastro-50dd88bc6611243e3f1b2df643af6d0b551fe140.tar.gz
astro-50dd88bc6611243e3f1b2df643af6d0b551fe140.tar.zst
astro-50dd88bc6611243e3f1b2df643af6d0b551fe140.zip
fix(@astrojs/rss): prevent an error when `pubDate` is missing (#12137)
* fix(rss): prevent error when `pubDate` is missing * docs(rss): switch some RSS items to optional
Diffstat (limited to '')
-rw-r--r--packages/astro-rss/test/test-utils.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/astro-rss/test/test-utils.js b/packages/astro-rss/test/test-utils.js
index dcc57df21..d3ee8ca33 100644
--- a/packages/astro-rss/test/test-utils.js
+++ b/packages/astro-rss/test/test-utils.js
@@ -4,13 +4,16 @@ export const title = 'My RSS feed';
export const description = 'This sure is a nice RSS feed';
export const site = 'https://example.com';
-export const phpFeedItem = {
+export const phpFeedItemWithoutDate = {
link: '/php',
title: 'Remember PHP?',
- pubDate: '1994-05-03',
description:
'PHP is a general-purpose scripting language geared toward web development. It was originally created by Danish-Canadian programmer Rasmus Lerdorf in 1994.',
};
+export const phpFeedItem = {
+ ...phpFeedItemWithoutDate,
+ pubDate: '1994-05-03',
+};
export const phpFeedItemWithContent = {
...phpFeedItem,
content: `<h1>${phpFeedItem.title}</h1><p>${phpFeedItem.description}</p>`,