1
0
Fork 0
peertube/shared/extra-utils/videos/captions.ts
2021-08-27 15:12:22 +02:00

17 lines
452 B
TypeScript

import { expect } from 'chai'
import request from 'supertest'
import { HttpStatusCode } from '@shared/models'
async function testCaptionFile (url: string, captionPath: string, containsString: string) {
const res = await request(url)
.get(captionPath)
.expect(HttpStatusCode.OK_200)
expect(res.text).to.contain(containsString)
}
// ---------------------------------------------------------------------------
export {
testCaptionFile
}