-/* tslint:disable:no-unused-expression */
+/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import 'mocha'
import {
+ cleanupTests,
createUser,
deleteVideoAbuse,
- flushTests,
- killallServers,
+ flushAndRunServer,
makeGetRequest,
makePostBodyRequest,
- runServer,
ServerInfo,
setAccessTokensToServers,
updateVideoAbuse,
uploadVideo,
userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
import {
checkBadCountPagination,
checkBadSortPagination,
checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
+} from '../../../../shared/extra-utils/requests/check-api-params'
import { VideoAbuseState } from '../../../../shared/models/videos'
describe('Test video abuses API validators', function () {
before(async function () {
this.timeout(30000)
- await flushTests()
-
- server = await runServer(1)
+ server = await flushAndRunServer(1)
await setAccessTokensToServers([ server ])
describe('When updating a video abuse', function () {
const basePath = '/api/v1/videos/'
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
let path: string
before(() => {
describe('When deleting a video abuse', function () {
const basePath = '/api/v1/videos/'
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
let path: string
before(() => {
})
after(async function () {
- killallServers([ server ])
-
- // Keep the logs if the test failed
- if (this['ok']) {
- await flushTests()
- }
+ await cleanupTests([ server ])
})
})