aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/server/auto-follows.ts8
-rw-r--r--server/tests/api/server/jobs.ts2
2 files changed, 4 insertions, 6 deletions
diff --git a/server/tests/api/server/auto-follows.ts b/server/tests/api/server/auto-follows.ts
index ce7b51925..ca6475bd5 100644
--- a/server/tests/api/server/auto-follows.ts
+++ b/server/tests/api/server/auto-follows.ts
@@ -19,16 +19,16 @@ async function checkFollow (follower: PeerTubeServer, following: PeerTubeServer,
19 const body = await following.follows.getFollowers({ start: 0, count: 5, sort: '-createdAt' }) 19 const body = await following.follows.getFollowers({ start: 0, count: 5, sort: '-createdAt' })
20 const follow = body.data.find(f => f.follower.host === follower.host && f.state === 'accepted') 20 const follow = body.data.find(f => f.follower.host === follower.host && f.state === 'accepted')
21 21
22 if (exists === true) expect(follow).to.exist 22 if (exists === true) expect(follow, `Follower ${follower.url} should exist on ${following.url}`).to.exist
23 else expect(follow).to.be.undefined 23 else expect(follow, `Follower ${follower.url} should not exist on ${following.url}`).to.be.undefined
24 } 24 }
25 25
26 { 26 {
27 const body = await follower.follows.getFollowings({ start: 0, count: 5, sort: '-createdAt' }) 27 const body = await follower.follows.getFollowings({ start: 0, count: 5, sort: '-createdAt' })
28 const follow = body.data.find(f => f.following.host === following.host && f.state === 'accepted') 28 const follow = body.data.find(f => f.following.host === following.host && f.state === 'accepted')
29 29
30 if (exists === true) expect(follow).to.exist 30 if (exists === true) expect(follow, `Following ${following.url} should exist on ${follower.url}`).to.exist
31 else expect(follow).to.be.undefined 31 else expect(follow, `Following ${following.url} should not exist on ${follower.url}`).to.be.undefined
32 } 32 }
33} 33}
34 34
diff --git a/server/tests/api/server/jobs.ts b/server/tests/api/server/jobs.ts
index 937028e4f..8c4e01226 100644
--- a/server/tests/api/server/jobs.ts
+++ b/server/tests/api/server/jobs.ts
@@ -88,8 +88,6 @@ describe('Test jobs', function () {
88 const jobs = body.data 88 const jobs = body.data
89 expect(jobs).to.have.length.above(2) 89 expect(jobs).to.have.length.above(2)
90 90
91 // We know there are a least 1 delayed job (video views) and 1 completed job (broadcast)
92 expect(jobs.find(j => j.state === 'delayed')).to.not.be.undefined
93 expect(jobs.find(j => j.state === 'completed')).to.not.be.undefined 91 expect(jobs.find(j => j.state === 'completed')).to.not.be.undefined
94 }) 92 })
95 93