]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/single-server.ts
Merge branch 'release/4.3.0' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / single-server.ts
index 0e429fef75864baf85eea300e6d33ef026efc6b8..da8bde07b6df729f982d48b5a8cf5d2ace81ca2a 100644 (file)
@@ -1,7 +1,6 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
-import 'mocha'
-import * as chai from 'chai'
+import { expect } from 'chai'
 import { checkVideoFilesWereRemoved, completeVideoCheck, testImage } from '@server/tests/shared'
 import { wait } from '@shared/core-utils'
 import { Video, VideoPrivacy } from '@shared/models'
@@ -11,11 +10,10 @@ import {
   PeerTubeServer,
   setAccessTokensToServers,
   setDefaultAccountAvatar,
-  setDefaultChannelAvatar
+  setDefaultChannelAvatar,
+  waitJobs
 } from '@shared/server-commands'
 
-const expect = chai.expect
-
 describe('Test a single server', function () {
 
   function runSuite (mode: 'legacy' | 'resumable') {
@@ -358,6 +356,8 @@ describe('Test a single server', function () {
     it('Should have the video updated', async function () {
       this.timeout(60000)
 
+      await waitJobs([ server ])
+
       const video = await server.videos.get({ id: videoId })
 
       await completeVideoCheck(server, video, updateCheckAttributes())