diff options
Diffstat (limited to 'shared/extra-utils/videos/captions.ts')
-rw-r--r-- | shared/extra-utils/videos/captions.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/shared/extra-utils/videos/captions.ts b/shared/extra-utils/videos/captions.ts new file mode 100644 index 000000000..2246bd133 --- /dev/null +++ b/shared/extra-utils/videos/captions.ts | |||
@@ -0,0 +1,17 @@ | |||
1 | import { expect } from 'chai' | ||
2 | import * as request from 'supertest' | ||
3 | import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes' | ||
4 | |||
5 | async function testCaptionFile (url: string, captionPath: string, containsString: string) { | ||
6 | const res = await request(url) | ||
7 | .get(captionPath) | ||
8 | .expect(HttpStatusCode.OK_200) | ||
9 | |||
10 | expect(res.text).to.contain(containsString) | ||
11 | } | ||
12 | |||
13 | // --------------------------------------------------------------------------- | ||
14 | |||
15 | export { | ||
16 | testCaptionFile | ||
17 | } | ||