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) {
17 const path = '/feeds/' + feed + '.json'
21 .set('Accept', 'application/json')
23 .expect('Content-Type', /json/)
26 // ---------------------------------------------------------------------------