1 import * as request from 'supertest'
3 type FeedType = 'videos' | 'video-comments'
5 function getXMLfeed (url: string, feed: FeedType, format?: string) {
6 const path = '/feeds/' + feed + '.xml'
10 .query((format) ? { format: format } : {})
11 .set('Accept', 'application/xml')
13 .expect('Content-Type', /xml/)
16 function getJSONfeed (url: string, feed: FeedType, query: any = {}) {
17 const path = '/feeds/' + feed + '.json'
22 .set('Accept', 'application/json')
24 .expect('Content-Type', /json/)
27 // ---------------------------------------------------------------------------