-/* tslint:disable:no-unused-expression */
+/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
-import * as chai from 'chai'
import 'mocha'
import {
checkBadCountPagination,
checkBadStartPagination,
- flushTests,
- killallServers,
+ cleanupTests,
+ flushAndRunServer,
makeGetRequest,
makePostBodyRequest,
makePutBodyRequest,
- runServer,
ServerInfo,
setAccessTokensToServers,
uploadVideo
} from '../../../../shared/extra-utils'
-const expect = chai.expect
-
describe('Test videos history API validator', function () {
+ const myHistoryPath = '/api/v1/users/me/history/videos'
+ const myHistoryRemove = myHistoryPath + '/remove'
let watchingPath: string
- let myHistoryPath = '/api/v1/users/me/history/videos'
- let myHistoryRemove = myHistoryPath + '/remove'
let server: ServerInfo
// ---------------------------------------------------------------
before(async function () {
this.timeout(30000)
- await flushTests()
-
- server = await runServer(1)
+ server = await flushAndRunServer(1)
await setAccessTokensToServers([ server ])
})
after(async function () {
- killallServers([ server ])
-
- // Keep the logs if the test failed
- if (this['ok']) {
- await flushTests()
- }
+ await cleanupTests([ server ])
})
})