aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos/captions.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-08 11:49:38 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:17 +0200
commita2470c9f4bfc7f49f4b94de935bacdd53fd54f29 (patch)
treecb6b6b33d1a404fe31547c004241a7eb9743b64e /shared/extra-utils/videos/captions.ts
parente3d15a6a9aed97a004d9dac1b7a6499d794e080a (diff)
downloadPeerTube-a2470c9f4bfc7f49f4b94de935bacdd53fd54f29.tar.gz
PeerTube-a2470c9f4bfc7f49f4b94de935bacdd53fd54f29.tar.zst
PeerTube-a2470c9f4bfc7f49f4b94de935bacdd53fd54f29.zip
Introduce captions command
Diffstat (limited to 'shared/extra-utils/videos/captions.ts')
-rw-r--r--shared/extra-utils/videos/captions.ts17
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 @@
1import { expect } from 'chai'
2import * as request from 'supertest'
3import { HttpStatusCode } from '../../core-utils/miscs/http-error-codes'
4
5async 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
15export {
16 testCaptionFile
17}