]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/utils/feeds/feeds.ts
Don't set a bitrate on unknown audio input
[github/Chocobozzz/PeerTube.git] / server / tests / utils / feeds / feeds.ts
index 20e68cf3dd88302e2f2e7d1f68faf161cf0fa299..ffd23a1adeb257371194e7d7a402908bf8ee1c64 100644 (file)
@@ -1,8 +1,10 @@
 import * as request from 'supertest'
 import { readFileBufferPromise } from '../../../helpers/core-utils'
 
-function getXMLfeed (url: string, format?: string) {
-  const path = '/feeds/videos.xml'
+type FeedType = 'videos' | 'video-comments'
+
+function getXMLfeed (url: string, feed: FeedType, format?: string) {
+  const path = '/feeds/' + feed + '.xml'
 
   return request(url)
           .get(path)
@@ -12,8 +14,8 @@ function getXMLfeed (url: string, format?: string) {
           .expect('Content-Type', /xml/)
 }
 
-function getJSONfeed (url: string) {
-  const path = '/feeds/videos.json'
+function getJSONfeed (url: string, feed: FeedType) {
+  const path = '/feeds/' + feed + '.json'
 
   return request(url)
           .get(path)