aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorFlorent <florent.git@zeteo.me>2022-08-06 15:20:43 +0200
committerChocobozzz <chocobozzz@cpy.re>2022-08-08 08:25:36 +0200
commit7e0f50d6e0c7dc583d40e196c283eb20dc386ae6 (patch)
treea44a68f32dafb3ff3b4a6b1a88f7718423d676b9 /server/tests
parent2c9c6e653e896b9815b360bd566a657999fffb31 (diff)
downloadPeerTube-7e0f50d6e0c7dc583d40e196c283eb20dc386ae6.tar.gz
PeerTube-7e0f50d6e0c7dc583d40e196c283eb20dc386ae6.tar.zst
PeerTube-7e0f50d6e0c7dc583d40e196c283eb20dc386ae6.zip
Use single quotes in server/ and update eslint rules
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/api/moderation/abuses.ts20
-rw-r--r--server/tests/feeds/feeds.ts2
2 files changed, 11 insertions, 11 deletions
diff --git a/server/tests/api/moderation/abuses.ts b/server/tests/api/moderation/abuses.ts
index 568fbefcf..0a656b41f 100644
--- a/server/tests/api/moderation/abuses.ts
+++ b/server/tests/api/moderation/abuses.ts
@@ -260,12 +260,12 @@ describe('Test abuses', function () {
260 await waitJobs(servers) 260 await waitJobs(servers)
261 261
262 const body = await commands[1].getAdminList() 262 const body = await commands[1].getAdminList()
263 expect(body.total).to.equal(2, "wrong number of videos returned") 263 expect(body.total).to.equal(2, 'wrong number of videos returned')
264 expect(body.data).to.have.lengthOf(2, "wrong number of videos returned") 264 expect(body.data).to.have.lengthOf(2, 'wrong number of videos returned')
265 265
266 const abuse = body.data[0] 266 const abuse = body.data[0]
267 expect(abuse.id).to.equal(abuseServer2.id, "wrong origin server id for first video") 267 expect(abuse.id).to.equal(abuseServer2.id, 'wrong origin server id for first video')
268 expect(abuse.video.id).to.equal(abuseServer2.video.id, "wrong video id") 268 expect(abuse.video.id).to.equal(abuseServer2.video.id, 'wrong video id')
269 expect(abuse.video.channel).to.exist 269 expect(abuse.video.channel).to.exist
270 expect(abuse.video.deleted).to.be.true 270 expect(abuse.video.deleted).to.be.true
271 }) 271 })
@@ -299,13 +299,13 @@ describe('Test abuses', function () {
299 299
300 const abuseVideo3 = body.data.find(a => a.video.id === video3Id) 300 const abuseVideo3 = body.data.find(a => a.video.id === video3Id)
301 expect(abuseVideo3).to.not.be.undefined 301 expect(abuseVideo3).to.not.be.undefined
302 expect(abuseVideo3.video.countReports).to.equal(1, "wrong reports count for video 3") 302 expect(abuseVideo3.video.countReports).to.equal(1, 'wrong reports count for video 3')
303 expect(abuseVideo3.video.nthReport).to.equal(1, "wrong report position in report list for video 3") 303 expect(abuseVideo3.video.nthReport).to.equal(1, 'wrong report position in report list for video 3')
304 expect(abuseVideo3.countReportsForReportee).to.equal(1, "wrong reports count for reporter on video 3 abuse") 304 expect(abuseVideo3.countReportsForReportee).to.equal(1, 'wrong reports count for reporter on video 3 abuse')
305 expect(abuseVideo3.countReportsForReporter).to.equal(3, "wrong reports count for reportee on video 3 abuse") 305 expect(abuseVideo3.countReportsForReporter).to.equal(3, 'wrong reports count for reportee on video 3 abuse')
306 306
307 const abuseServer1 = abuses.find(a => a.video.id === servers[0].store.videoCreated.id) 307 const abuseServer1 = abuses.find(a => a.video.id === servers[0].store.videoCreated.id)
308 expect(abuseServer1.countReportsForReportee).to.equal(3, "wrong reports count for reporter on video 1 abuse") 308 expect(abuseServer1.countReportsForReportee).to.equal(3, 'wrong reports count for reporter on video 1 abuse')
309 } 309 }
310 }) 310 })
311 311
@@ -327,7 +327,7 @@ describe('Test abuses', function () {
327 { 327 {
328 const abuse = body.data.find(a => a.id === createRes.abuse.id) 328 const abuse = body.data.find(a => a.id === createRes.abuse.id)
329 expect(abuse.reason).to.equals(reason5) 329 expect(abuse.reason).to.equals(reason5)
330 expect(abuse.predefinedReasons).to.deep.equals(predefinedReasons5, "predefined reasons do not match the one reported") 330 expect(abuse.predefinedReasons).to.deep.equals(predefinedReasons5, 'predefined reasons do not match the one reported')
331 expect(abuse.video.startAt).to.equal(1, "starting timestamp doesn't match the one reported") 331 expect(abuse.video.startAt).to.equal(1, "starting timestamp doesn't match the one reported")
332 expect(abuse.video.endAt).to.equal(5, "ending timestamp doesn't match the one reported") 332 expect(abuse.video.endAt).to.equal(5, "ending timestamp doesn't match the one reported")
333 } 333 }
diff --git a/server/tests/feeds/feeds.ts b/server/tests/feeds/feeds.ts
index c7331d544..67a9ed8e0 100644
--- a/server/tests/feeds/feeds.ts
+++ b/server/tests/feeds/feeds.ts
@@ -433,7 +433,7 @@ describe('Test syndication feeds', () => {
433 433
434 { 434 {
435 const body = await servers[0].subscriptions.listVideos({ token: userAccessToken }) 435 const body = await servers[0].subscriptions.listVideos({ token: userAccessToken })
436 expect(body.total).to.equal(2, "there should be 2 videos part of the subscription") 436 expect(body.total).to.equal(2, 'there should be 2 videos part of the subscription')
437 437
438 const query = { accountId: userAccountId, token: userFeedToken } 438 const query = { accountId: userAccountId, token: userFeedToken }
439 const json = await servers[0].feed.getJSON({ feed: 'subscriptions', query, ignoreCache: true }) 439 const json = await servers[0].feed.getJSON({ feed: 'subscriptions', query, ignoreCache: true })