]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/helpers/comment-model.ts
Add ability to install alpha/beta/rc plugin
[github/Chocobozzz/PeerTube.git] / server / tests / helpers / comment-model.ts
index ebfd779e1a2dc3ced834fcd76f8ec5e467e5ee91..e39cae442ec8569346e38038c4a61360cdf5fe74 100644 (file)
@@ -1,11 +1,8 @@
-/* tslint:disable:no-unused-expression */
+/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
-import * as chai from 'chai'
-import 'mocha'
+import { expect } from 'chai'
 import { VideoCommentModel } from '../../models/video/video-comment'
 
-const expect = chai.expect
-
 class CommentMock {
   text: string
 
@@ -20,7 +17,7 @@ describe('Comment model', function () {
 
     comment.text = '@florian @jean@localhost:9000 @flo @another@localhost:9000 @flo2@jean.com hello ' +
       'email@localhost:9000 coucou.com no? @chocobozzz @chocobozzz @end'
-    const result = comment.extractMentions().sort()
+    const result = comment.extractMentions().sort((a, b) => a.localeCompare(b))
 
     expect(result).to.deep.equal([ 'another', 'chocobozzz', 'end', 'flo', 'florian', 'jean' ])
   })