X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Fvideo-channels.ts;h=1782474fd79e698e5c9102e2a8f0e5d71720a2d1;hb=bbd5aa7ead5f1554a0872963f957effc26d8c630;hp=9024126c034760363c2d4147cd773a7847f42807;hpb=a3b472a12ec6e57dbe2f650419f8064864686eab;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/video-channels.ts b/server/tests/api/check-params/video-channels.ts index 9024126c0..1782474fd 100644 --- a/server/tests/api/check-params/video-channels.ts +++ b/server/tests/api/check-params/video-channels.ts @@ -1,10 +1,8 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' -import * as chai from 'chai' -import { omit } from 'lodash' +import { expect } from 'chai' import { checkBadCountPagination, checkBadSortPagination, checkBadStartPagination } from '@server/tests/shared' -import { buildAbsoluteFixturePath } from '@shared/core-utils' +import { buildAbsoluteFixturePath, omit } from '@shared/core-utils' import { HttpStatusCode, VideoChannelUpdate } from '@shared/models' import { ChannelsCommand, @@ -18,8 +16,6 @@ import { setAccessTokensToServers } from '@shared/server-commands' -const expect = chai.expect - describe('Test video channels API validator', function () { const videoChannelPath = '/api/v1/video-channels' let server: PeerTubeServer @@ -121,7 +117,7 @@ describe('Test video channels API validator', function () { }) it('Should fail without a name', async function () { - const fields = omit(baseCorrectParams, 'name') + const fields = omit(baseCorrectParams, [ 'name' ]) await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) }) @@ -131,7 +127,7 @@ describe('Test video channels API validator', function () { }) it('Should fail without a name', async function () { - const fields = omit(baseCorrectParams, 'displayName') + const fields = omit(baseCorrectParams, [ 'displayName' ]) await makePostBodyRequest({ url: server.url, path: videoChannelPath, token: server.accessToken, fields }) })