+function getVideosListWithToken (url: string, token: string, query: { nsfw?: boolean } = {}) {
+ const path = '/api/v1/videos'
+
+ return request(url)
+ .get(path)
+ .set('Authorization', 'Bearer ' + token)
+ .query(immutableAssign(query, { sort: 'name' }))
+ .set('Accept', 'application/json')
+ .expect(200)
+ .expect('Content-Type', /json/)
+}
+
+function getLocalVideos (url: string) {
+ const path = '/api/v1/videos'
+
+ return request(url)
+ .get(path)
+ .query({ sort: 'name', filter: 'local' })
+ .set('Accept', 'application/json')
+ .expect(200)
+ .expect('Content-Type', /json/)
+}
+