mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-12-01 21:09:17 -06:00
18 lines
482 B
TypeScript
18 lines
482 B
TypeScript
import { expect } from 'chai'
|
|
import * as request from 'supertest'
|
|
import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes'
|
|
|
|
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
|
|
}
|