aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/check-params/video-channels.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-channels.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-channels.ts')
-rw-r--r--server/tests/api/check-params/video-channels.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts
index bc2e6192e..5c02afd31 100644
--- a/server/tests/api/check-params/video-channels.ts
+++ b/server/tests/api/check-params/video-channels.ts
@@ -1,9 +1,11 @@
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 * as chai from 'chai' 4import * as chai from 'chai'
4import { omit } from 'lodash' 5import { omit } from 'lodash'
5import 'mocha' 6import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
6import { 7import {
8 buildAbsoluteFixturePath,
7 cleanupTests, 9 cleanupTests,
8 createUser, 10 createUser,
9 deleteVideoChannel, 11 deleteVideoChannel,
@@ -23,9 +25,7 @@ import {
23 checkBadSortPagination, 25 checkBadSortPagination,
24 checkBadStartPagination 26 checkBadStartPagination
25} from '../../../../shared/extra-utils/requests/check-api-params' 27} from '../../../../shared/extra-utils/requests/check-api-params'
26import { join } from 'path'
27import { VideoChannelUpdate } from '../../../../shared/models/videos' 28import { VideoChannelUpdate } from '../../../../shared/models/videos'
28import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
29 29
30const expect = chai.expect 30const expect = chai.expect
31 31
@@ -246,7 +246,7 @@ describe('Test video channels API validator', function () {
246 for (const type of types) { 246 for (const type of types) {
247 const fields = {} 247 const fields = {}
248 const attaches = { 248 const attaches = {
249 [type + 'file']: join(__dirname, '..', '..', 'fixtures', 'video_short.mp4') 249 [type + 'file']: buildAbsoluteFixturePath('video_short.mp4')
250 } 250 }
251 251
252 await makeUploadRequest({ url: server.url, path: `${path}/${type}/pick`, token: server.accessToken, fields, attaches }) 252 await makeUploadRequest({ url: server.url, path: `${path}/${type}/pick`, token: server.accessToken, fields, attaches })
@@ -257,7 +257,7 @@ describe('Test video channels API validator', function () {
257 for (const type of types) { 257 for (const type of types) {
258 const fields = {} 258 const fields = {}
259 const attaches = { 259 const attaches = {
260 [type + 'file']: join(__dirname, '..', '..', 'fixtures', 'avatar-big.png') 260 [type + 'file']: buildAbsoluteFixturePath('avatar-big.png')
261 } 261 }
262 await makeUploadRequest({ url: server.url, path: `${path}/${type}/pick`, token: server.accessToken, fields, attaches }) 262 await makeUploadRequest({ url: server.url, path: `${path}/${type}/pick`, token: server.accessToken, fields, attaches })
263 } 263 }
@@ -267,7 +267,7 @@ describe('Test video channels API validator', function () {
267 for (const type of types) { 267 for (const type of types) {
268 const fields = {} 268 const fields = {}
269 const attaches = { 269 const attaches = {
270 [type + 'file']: join(__dirname, '..', '..', 'fixtures', 'avatar.png') 270 [type + 'file']: buildAbsoluteFixturePath('avatar.png')
271 } 271 }
272 await makeUploadRequest({ 272 await makeUploadRequest({
273 url: server.url, 273 url: server.url,
@@ -283,7 +283,7 @@ describe('Test video channels API validator', function () {
283 for (const type of types) { 283 for (const type of types) {
284 const fields = {} 284 const fields = {}
285 const attaches = { 285 const attaches = {
286 [type + 'file']: join(__dirname, '..', '..', 'fixtures', 'avatar.png') 286 [type + 'file']: buildAbsoluteFixturePath('avatar.png')
287 } 287 }
288 await makeUploadRequest({ 288 await makeUploadRequest({
289 url: server.url, 289 url: server.url,