2021-07-08 11:49:38 +02:00
|
|
|
import { expect } from 'chai'
|
|
|
|
import * as request from 'supertest'
|
2021-07-16 10:42:24 +02:00
|
|
|
import { HttpStatusCode } from '@shared/models'
|
2021-07-08 11:49:38 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|