X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Ffeeds%2Ffeeds.ts;h=a1c976fd30d013ed3d3f0c5ef66c354efd6121cb;hb=41fb13c330de629df2d23379209e79c7af0f2e9a;hp=55b4348465516294ce48e73bde82ff35c6d88233;hpb=421ff4618da64f0849353383f690a014024c40da;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/feeds/feeds.ts b/server/tests/feeds/feeds.ts index 55b434846..a1c976fd3 100644 --- a/server/tests/feeds/feeds.ts +++ b/server/tests/feeds/feeds.ts @@ -2,7 +2,7 @@ import 'mocha' import * as chai from 'chai' -import * as xmlParser from 'fast-xml-parser' +import { parse, validate } from 'fast-xml-parser' import { cleanupTests, createMultipleServers, @@ -149,9 +149,9 @@ describe('Test syndication feeds', () => { it('Should contain a valid enclosure (covers RSS 2.0 endpoint)', async function () { for (const server of servers) { const rss = await server.feed.getXML({ feed: 'videos' }) - expect(xmlParser.validate(rss)).to.be.true + expect(validate(rss)).to.be.true - const xmlDoc = xmlParser.parse(rss, { parseAttributeValue: true, ignoreAttributes: false }) + const xmlDoc = parse(rss, { parseAttributeValue: true, ignoreAttributes: false }) const enclosure = xmlDoc.rss.channel.item[0].enclosure expect(enclosure).to.exist