aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos/captions.ts
blob: ff8a43366f39819849990104e99f4742b35d3246 (plain) (blame)
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 '@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
}