aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/video-captions.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-14 16:52:22 +0200
committerChocobozzz <chocobozzz@cpy.re>2021-06-15 08:21:12 +0200
commit3d470a530c4a48b2e4f4a9e7d4f223e14f32cea4 (patch)
tree7305399caecbf7380319bd08e21c933de88096dc /server/tests/api/check-params/video-captions.ts
parent79db409a41bd28fd2773626c9a93b5d326a38bc0 (diff)
downloadPeerTube-3d470a530c4a48b2e4f4a9e7d4f223e14f32cea4.tar.gz
PeerTube-3d470a530c4a48b2e4f4a9e7d4f223e14f32cea4.tar.zst
PeerTube-3d470a530c4a48b2e4f4a9e7d4f223e14f32cea4.zip
Faster ci using compiled ts files
Diffstat (limited to 'server/tests/api/check-params/video-captions.ts')
-rw-r--r--server/tests/api/check-params/video-captions.ts11
1 files changed, 6 insertions, 5 deletions
diff --git a/server/tests/api/check-params/video-captions.ts b/server/tests/api/check-params/video-captions.ts
index 2f049c03d..1ce2202d2 100644
--- a/server/tests/api/check-params/video-captions.ts
+++ b/server/tests/api/check-params/video-captions.ts
@@ -1,7 +1,10 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ 1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2 2
3import 'mocha' 3import 'mocha'
4
5import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
4import { 6import {
7 buildAbsoluteFixturePath,
5 cleanupTests, 8 cleanupTests,
6 createUser, 9 createUser,
7 flushAndRunServer, 10 flushAndRunServer,
@@ -13,9 +16,7 @@ import {
13 uploadVideo, 16 uploadVideo,
14 userLogin 17 userLogin
15} from '../../../../shared/extra-utils' 18} from '../../../../shared/extra-utils'
16import { join } from 'path'
17import { createVideoCaption } from '../../../../shared/extra-utils/videos/video-captions' 19import { createVideoCaption } from '../../../../shared/extra-utils/videos/video-captions'
18import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
19 20
20describe('Test video captions API validator', function () { 21describe('Test video captions API validator', function () {
21 const path = '/api/v1/videos/' 22 const path = '/api/v1/videos/'
@@ -51,7 +52,7 @@ describe('Test video captions API validator', function () {
51 describe('When adding video caption', function () { 52 describe('When adding video caption', function () {
52 const fields = { } 53 const fields = { }
53 const attaches = { 54 const attaches = {
54 captionfile: join(__dirname, '..', '..', 'fixtures', 'subtitle-good1.vtt') 55 captionfile: buildAbsoluteFixturePath('subtitle-good1.vtt')
55 } 56 }
56 57
57 it('Should fail without a valid uuid', async function () { 58 it('Should fail without a valid uuid', async function () {
@@ -129,7 +130,7 @@ describe('Test video captions API validator', function () {
129 // We accept any file now 130 // We accept any file now
130 // it('Should fail with an invalid captionfile extension', async function () { 131 // it('Should fail with an invalid captionfile extension', async function () {
131 // const attaches = { 132 // const attaches = {
132 // 'captionfile': join(__dirname, '..', '..', 'fixtures', 'subtitle-bad.txt') 133 // 'captionfile': buildAbsoluteFixturePath('subtitle-bad.txt')
133 // } 134 // }
134 // 135 //
135 // const captionPath = path + videoUUID + '/captions/fr' 136 // const captionPath = path + videoUUID + '/captions/fr'
@@ -171,7 +172,7 @@ describe('Test video captions API validator', function () {
171 // We don't check the file validity yet 172 // We don't check the file validity yet
172 // it('Should fail with an invalid captionfile srt', async function () { 173 // it('Should fail with an invalid captionfile srt', async function () {
173 // const attaches = { 174 // const attaches = {
174 // 'captionfile': join(__dirname, '..', '..', 'fixtures', 'subtitle-bad.srt') 175 // 'captionfile': buildAbsoluteFixturePath('subtitle-bad.srt')
175 // } 176 // }
176 // 177 //
177 // const captionPath = path + videoUUID + '/captions/fr' 178 // const captionPath = path + videoUUID + '/captions/fr'