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.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/packages/astro-rss/test/rss.test.js b/packages/astro-rss/test/rss.test.js
index 9962e83f9..bc5816142 100644
--- a/packages/astro-rss/test/rss.test.js
+++ b/packages/astro-rss/test/rss.test.js
@@ -123,4 +123,24 @@ describe('rss', () => {
).to.be.rejected;
});
});
+
+ describe('errors', () => {
+ it('should provide a good error message when a link is not provided', async () => {
+ try {
+ await rss({
+ title: 'Your Website Title',
+ description: 'Your Website Description',
+ site: 'https://astro-demo',
+ items: [{
+ pubDate: new Date(),
+ title: 'Some title',
+ slug: 'foo'
+ }]
+ });
+ chai.expect(false).to.equal(true, 'Should have errored');
+ } catch(err) {
+ chai.expect(err.message).to.contain('Required field [link] is missing');
+ }
+ });
+ })
});