summaryrefslogtreecommitdiff
path: root/packages/astro-rss
diff options
context:
space:
mode:
authorGravatar Florian Lefebvre <contact@florian-lefebvre.dev> 2024-02-05 10:13:54 +0100
committerGravatar GitHub <noreply@github.com> 2024-02-05 10:13:54 +0100
commitb3b9f280c59b9cd3e7082b03adf4fbe88f37ad6f (patch)
tree260fda2ba5b4da3ba6957ad003bfa8df52381367 /packages/astro-rss
parent19df112cf744f2d24319ce76eb31d52014ab98c6 (diff)
downloadastro-b3b9f280c59b9cd3e7082b03adf4fbe88f37ad6f.tar.gz
astro-b3b9f280c59b9cd3e7082b03adf4fbe88f37ad6f.tar.zst
astro-b3b9f280c59b9cd3e7082b03adf4fbe88f37ad6f.zip
fix(rss): use node assert instead of chai (#9980)
Diffstat (limited to 'packages/astro-rss')
-rw-r--r--packages/astro-rss/test/rss.test.js41
1 files changed, 23 insertions, 18 deletions
diff --git a/packages/astro-rss/test/rss.test.js b/packages/astro-rss/test/rss.test.js
index dea3e7787..3ef617486 100644
--- a/packages/astro-rss/test/rss.test.js
+++ b/packages/astro-rss/test/rss.test.js
@@ -240,25 +240,30 @@ describe('getRssString', () => {
});
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',
+ let error = null;
+ try {
+ await getRssString({
+ title,
+ description,
+ items: [
+ {
+ title: 'Title',
+ pubDate: new Date().toISOString(),
+ description: 'Description',
+ link: '/link',
+ enclosure: {
+ url: '/enclosure',
+ length: 0,
+ type: 'audio/mpeg',
+ },
},
- },
- ],
- site,
- });
+ ],
+ site,
+ });
+ } catch (e) {
+ error = e.message;
+ }
- chai.expect(str).to.not.throw;
+ assert.strictEqual(error, null);
});
});