]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/video-comments.ts
Fix tests
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / video-comments.ts
index e077cbf73569c2653012a9c1b13165fe7a736f27..b7d5624a6b3c8f794928844af4451219084af380 100644 (file)
@@ -24,7 +24,7 @@ describe('Test video comments', function () {
   let command: CommentsCommand
 
   before(async function () {
-    this.timeout(30000)
+    this.timeout(120000)
 
     server = await createSingleServer(1)
 
@@ -169,6 +169,13 @@ describe('Test video comments', function () {
       expect(body.data[2].totalReplies).to.equal(0)
     })
 
+    it('Should list the and sort them by total replies', async function () {
+      const body = await command.listThreads({ videoId: videoUUID, sort: 'totalReplies' })
+
+      expect(body.data[2].text).to.equal('my super first comment')
+      expect(body.data[2].totalReplies).to.equal(3)
+    })
+
     it('Should delete a reply', async function () {
       await command.delete({ videoId, commentId: replyToDeleteId })