0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-31 23:31:30 -05:00

fix(rss): use node assert instead of chai (#9980)

This commit is contained in:
Florian Lefebvre 2024-02-05 10:13:54 +01:00 committed by GitHub
parent 19df112cf7
commit b3b9f280c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
});
});