1 import * as request from 'supertest'
2 import { readFileBufferPromise } from '../../../helpers/core-utils'
4 type FeedType = 'videos' | 'video-comments'
6 function getXMLfeed (url: string, feed: FeedType, format?: string) {
7 const path = '/feeds/' + feed + '.xml'
11 .query((format) ? { format: format } : {})
12 .set('Accept', 'application/xml')
14 .expect('Content-Type', /xml/)
17 function getJSONfeed (url: string, feed: FeedType) {
18 const path = '/feeds/' + feed + '.json'
22 .set('Accept', 'application/json')
24 .expect('Content-Type', /json/)
27 // ---------------------------------------------------------------------------