/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
+import 'mocha'
import * as chai from 'chai'
import { omit } from 'lodash'
-import 'mocha'
+import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
import {
+ buildAbsoluteFixturePath,
cleanupTests,
createUser,
deleteVideoChannel,
checkBadSortPagination,
checkBadStartPagination
} from '../../../../shared/extra-utils/requests/check-api-params'
-import { join } from 'path'
import { VideoChannelUpdate } from '../../../../shared/models/videos'
-import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
const expect = chai.expect
for (const type of types) {
const fields = {}
const attaches = {
- [type + 'file']: join(__dirname, '..', '..', 'fixtures', 'video_short.mp4')
+ [type + 'file']: buildAbsoluteFixturePath('video_short.mp4')
}
await makeUploadRequest({ url: server.url, path: `${path}/${type}/pick`, token: server.accessToken, fields, attaches })
for (const type of types) {
const fields = {}
const attaches = {
- [type + 'file']: join(__dirname, '..', '..', 'fixtures', 'avatar-big.png')
+ [type + 'file']: buildAbsoluteFixturePath('avatar-big.png')
}
await makeUploadRequest({ url: server.url, path: `${path}/${type}/pick`, token: server.accessToken, fields, attaches })
}
for (const type of types) {
const fields = {}
const attaches = {
- [type + 'file']: join(__dirname, '..', '..', 'fixtures', 'avatar.png')
+ [type + 'file']: buildAbsoluteFixturePath('avatar.png')
}
await makeUploadRequest({
url: server.url,
for (const type of types) {
const fields = {}
const attaches = {
- [type + 'file']: join(__dirname, '..', '..', 'fixtures', 'avatar.png')
+ [type + 'file']: buildAbsoluteFixturePath('avatar.png')
}
await makeUploadRequest({
url: server.url,