]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/extra-utils/videos/captions.ts
Refactor requests
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / videos / captions.ts
CommitLineData
a2470c9f
C
1import { expect } from 'chai'
2import * as request from 'supertest'
c0e8b12e 3import { HttpStatusCode } from '@shared/models'
a2470c9f
C
4
5async function testCaptionFile (url: string, captionPath: string, containsString: string) {
6 const res = await request(url)
7 .get(captionPath)
8 .expect(HttpStatusCode.OK_200)
9
10 expect(res.text).to.contain(containsString)
11}
12
13// ---------------------------------------------------------------------------
14
15export {
16 testCaptionFile
17}