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:
parent
19df112cf7
commit
b3b9f280c5
1 changed files with 23 additions and 18 deletions
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue