aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
Diffstat (limited to 'shared')
-rw-r--r--shared/extra-utils/server/jobs.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/shared/extra-utils/server/jobs.ts b/shared/extra-utils/server/jobs.ts
index afaaa5cd6..34fefd444 100644
--- a/shared/extra-utils/server/jobs.ts
+++ b/shared/extra-utils/server/jobs.ts
@@ -1,4 +1,5 @@
1 1
2import { expect } from 'chai'
2import { JobState, JobType } from '../../models' 3import { JobState, JobType } from '../../models'
3import { wait } from '../miscs' 4import { wait } from '../miscs'
4import { PeerTubeServer } from './server' 5import { PeerTubeServer } from './server'
@@ -70,8 +71,14 @@ async function waitJobs (serversArg: PeerTubeServer[] | PeerTubeServer, skipDela
70 } while (pendingRequests) 71 } while (pendingRequests)
71} 72}
72 73
74async function expectNoFailedTranscodingJob (server: PeerTubeServer) {
75 const { data } = await server.jobs.listFailed({ jobType: 'video-transcoding' })
76 expect(data).to.have.lengthOf(0)
77}
78
73// --------------------------------------------------------------------------- 79// ---------------------------------------------------------------------------
74 80
75export { 81export {
76 waitJobs 82 waitJobs,
83 expectNoFailedTranscodingJob
77} 84}