aboutsummaryrefslogblamecommitdiffhomepage
path: root/shared/extra-utils/videos/captions.ts
blob: 2246bd1335fb0dca86911e51f7a60abaac14e79f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                                           
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
}