]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/video-comments.ts
Merge branch 'release/v1.2.0'
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / video-comments.ts
index cf8166a9641232fc4baaebb8a52ea1b0c368aed6..ce1b17e35f881dfb4cc569d36cea642d68ed47dc 100644 (file)
@@ -3,15 +3,24 @@
 import * as chai from 'chai'
 import 'mocha'
 import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
-import { testImage } from '../../utils'
+import { testImage } from '../../../../shared/utils'
 import {
-  dateIsValid, flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, updateMyAvatar,
+  dateIsValid,
+  flushTests,
+  killallServers,
+  runServer,
+  ServerInfo,
+  setAccessTokensToServers,
+  updateMyAvatar,
   uploadVideo
-} from '../../utils/index'
+} from '../../../../shared/utils/index'
 import {
-  addVideoCommentReply, addVideoCommentThread, deleteVideoComment, getVideoCommentThreads,
+  addVideoCommentReply,
+  addVideoCommentThread,
+  deleteVideoComment,
+  getVideoCommentThreads,
   getVideoThreadComments
-} from '../../utils/videos/video-comments'
+} from '../../../../shared/utils/videos/video-comments'
 
 const expect = chai.expect
 
@@ -83,8 +92,7 @@ describe('Test video comments', function () {
     expect(comment.account.name).to.equal('root')
     expect(comment.account.host).to.equal('localhost:9001')
 
-    const test = await testImage(server.url, 'avatar-resized', comment.account.avatar.path, '.png')
-    expect(test).to.equal(true)
+    await testImage(server.url, 'avatar-resized', comment.account.avatar.path, '.png')
 
     expect(comment.totalReplies).to.equal(0)
     expect(dateIsValid(comment.createdAt as string)).to.be.true
@@ -195,10 +203,5 @@ describe('Test video comments', function () {
 
   after(async function () {
     killallServers([ server ])
-
-    // Keep the logs if the test failed
-    if (this['ok']) {
-      await flushTests()
-    }
   })
 })