aboutsummaryrefslogblamecommitdiffhomepage
path: root/shared/extra-utils/videos/captions.ts
blob: fc44cd250756717fb49ad61777f0a8edd3b19cec (plain) (tree)
1
2
3
                             
                               
                                               













                                                                                           
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
}