]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/feeds/feeds.ts
esModuleInterop to true
[github/Chocobozzz/PeerTube.git] / server / tests / feeds / feeds.ts
index 55b4348465516294ce48e73bde82ff35c6d88233..a1c976fd30d013ed3d3f0c5ef66c354efd6121cb 100644 (file)
@@ -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