mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Use test wrapper exit function
This commit is contained in:
@@ -4,6 +4,7 @@ import * as chai from 'chai'
|
||||
import 'mocha'
|
||||
import { AccountBlock, ServerBlock, Video } from '../../../../shared/index'
|
||||
import {
|
||||
cleanupTests,
|
||||
createUser,
|
||||
doubleFollow,
|
||||
flushAndRunMultipleServers,
|
||||
@@ -498,7 +499,7 @@ describe('Test blocklist', function () {
|
||||
})
|
||||
})
|
||||
|
||||
after(function () {
|
||||
killallServers(servers)
|
||||
after(async function () {
|
||||
await cleanupTests(servers)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import * as chai from 'chai'
|
||||
import 'mocha'
|
||||
import {
|
||||
cleanupTests,
|
||||
createUser,
|
||||
doubleFollow,
|
||||
flushAndRunMultipleServers,
|
||||
@@ -368,7 +369,7 @@ describe('Test users subscriptions', function () {
|
||||
}
|
||||
})
|
||||
|
||||
after(function () {
|
||||
killallServers(servers)
|
||||
after(async function () {
|
||||
await cleanupTests(servers)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -5,7 +5,7 @@ import 'mocha'
|
||||
import { Account } from '../../../../shared/models/actors'
|
||||
import {
|
||||
checkTmpIsEmpty,
|
||||
checkVideoFilesWereRemoved,
|
||||
checkVideoFilesWereRemoved, cleanupTests,
|
||||
createUser,
|
||||
doubleFollow,
|
||||
flushAndRunMultipleServers,
|
||||
@@ -235,7 +235,7 @@ describe('Test users with multiple servers', function () {
|
||||
}
|
||||
})
|
||||
|
||||
after(function () {
|
||||
killallServers(servers)
|
||||
after(async function () {
|
||||
await cleanupTests(servers)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -4,7 +4,7 @@ import * as chai from 'chai'
|
||||
import 'mocha'
|
||||
import {
|
||||
registerUser, flushTests, getUserInformation, getMyUserInformation, killallServers,
|
||||
userLogin, login, flushAndRunServer, ServerInfo, verifyEmail, updateCustomSubConfig, wait
|
||||
userLogin, login, flushAndRunServer, ServerInfo, verifyEmail, updateCustomSubConfig, wait, cleanupTests
|
||||
} from '../../../../shared/extra-utils'
|
||||
import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
|
||||
import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
|
||||
@@ -120,8 +120,9 @@ describe('Test users account verification', function () {
|
||||
await userLogin(server, user2)
|
||||
})
|
||||
|
||||
after(function () {
|
||||
after(async function () {
|
||||
MockSmtpServer.Instance.kill()
|
||||
killallServers([ server ])
|
||||
|
||||
await cleanupTests([ server ])
|
||||
})
|
||||
})
|
||||
|
||||
@@ -5,9 +5,10 @@ import 'mocha'
|
||||
import { User, UserRole } from '../../../../shared/index'
|
||||
import {
|
||||
blockUser,
|
||||
cleanupTests,
|
||||
createUser,
|
||||
deleteMe,
|
||||
flushTests,
|
||||
flushAndRunServer,
|
||||
getAccountRatings,
|
||||
getBlacklistedVideosList,
|
||||
getMyUserInformation,
|
||||
@@ -17,14 +18,12 @@ import {
|
||||
getUsersList,
|
||||
getUsersListPaginationAndSort,
|
||||
getVideosList,
|
||||
killallServers,
|
||||
login,
|
||||
makePutBodyRequest,
|
||||
rateVideo,
|
||||
registerUser,
|
||||
removeUser,
|
||||
removeVideo,
|
||||
flushAndRunServer,
|
||||
ServerInfo,
|
||||
testImage,
|
||||
unblockUser,
|
||||
@@ -677,7 +676,7 @@ describe('Test users', function () {
|
||||
})
|
||||
})
|
||||
|
||||
after(function () {
|
||||
killallServers([ server ])
|
||||
after(async function () {
|
||||
await cleanupTests([ server ])
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user