Fix typescript tests

This commit is contained in:
Chocobozzz
2024-02-23 08:33:01 +01:00
parent 007b845cab
commit db06d13c67
6 changed files with 12 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
import { expect } from 'chai'
import { wait } from '@peertube/peertube-core-utils'
import { arrayify, wait } from '@peertube/peertube-core-utils'
import { JobState, JobType, RunnerJobState } from '@peertube/peertube-models'
import { PeerTubeServer } from './server.js'
@@ -16,10 +16,7 @@ async function waitJobs (
? parseInt(process.env.NODE_PENDING_JOB_WAIT, 10)
: 250
let servers: PeerTubeServer[]
if (Array.isArray(serversArg) === false) servers = [ serversArg ]
else servers = serversArg
const servers = arrayify(serversArg)
const states: JobState[] = [ 'waiting', 'active' ]
if (!skipDelayed) states.push('delayed')