X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Fvideo-imports.ts;h=dbea39c48cb3340142e061b2e9ccf7c1e66dc073;hb=3b0bd70aa05ab82fa30fe67ed4899d44652c703a;hp=8ff115e7bb352baa6f33aecc3c359eadaba1c3ad;hpb=7c3b79768bd174b22154e8d2df0b1211e01ee56a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/video-imports.ts b/server/tests/api/check-params/video-imports.ts index 8ff115e7b..dbea39c48 100644 --- a/server/tests/api/check-params/video-imports.ts +++ b/server/tests/api/check-params/video-imports.ts @@ -1,4 +1,4 @@ -/* tslint:disable:no-unused-expression */ +/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ import { omit } from 'lodash' import 'mocha' @@ -29,6 +29,7 @@ describe('Test video imports API validator', function () { const path = '/api/v1/videos/imports' let server: ServerInfo let userAccessToken = '' + // eslint-disable-next-line @typescript-eslint/no-unused-vars let accountName: string let channelId: number @@ -48,7 +49,7 @@ describe('Test video imports API validator', function () { { const res = await getMyUserInformation(server.url, server.accessToken) - channelId = res.body.videoChannels[ 0 ].id + channelId = res.body.videoChannels[0].id accountName = res.body.account.name + '@' + res.body.account.host } }) @@ -91,7 +92,7 @@ describe('Test video imports API validator', function () { support: 'my super support text', tags: [ 'tag1', 'tag2' ], privacy: VideoPrivacy.PUBLIC, - channelId: channelId + channelId } }) @@ -196,7 +197,7 @@ describe('Test video imports API validator', function () { it('Should fail with an incorrect thumbnail file', async function () { const fields = baseCorrectParams const attaches = { - 'thumbnailfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png') + thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'avatar.png') } await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches }) @@ -205,7 +206,7 @@ describe('Test video imports API validator', function () { it('Should fail with a big thumbnail file', async function () { const fields = baseCorrectParams const attaches = { - 'thumbnailfile': join(__dirname, '..', '..', 'fixtures', 'avatar-big.png') + thumbnailfile: join(__dirname, '..', '..', 'fixtures', 'avatar-big.png') } await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches }) @@ -214,7 +215,7 @@ describe('Test video imports API validator', function () { it('Should fail with an incorrect preview file', async function () { const fields = baseCorrectParams const attaches = { - 'previewfile': join(__dirname, '..', '..', 'fixtures', 'avatar.png') + previewfile: join(__dirname, '..', '..', 'fixtures', 'avatar.png') } await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches }) @@ -223,7 +224,7 @@ describe('Test video imports API validator', function () { it('Should fail with a big preview file', async function () { const fields = baseCorrectParams const attaches = { - 'previewfile': join(__dirname, '..', '..', 'fixtures', 'avatar-big.png') + previewfile: join(__dirname, '..', '..', 'fixtures', 'avatar-big.png') } await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches }) @@ -232,7 +233,7 @@ describe('Test video imports API validator', function () { it('Should fail with an invalid torrent file', async function () { const fields = omit(baseCorrectParams, 'targetUrl') const attaches = { - 'torrentfile': join(__dirname, '..', '..', 'fixtures', 'avatar-big.png') + torrentfile: join(__dirname, '..', '..', 'fixtures', 'avatar-big.png') } await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches }) @@ -303,7 +304,7 @@ describe('Test video imports API validator', function () { fields = omit(fields, 'magnetUri') const attaches = { - 'torrentfile': join(__dirname, '..', '..', 'fixtures', 'video-720p.torrent') + torrentfile: join(__dirname, '..', '..', 'fixtures', 'video-720p.torrent') } await makeUploadRequest({ url: server.url, path, token: server.accessToken, fields, attaches, statusCodeExpected: 409 })