X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=server%2Ftests%2Fhelpers%2Fcomment-model.ts;h=e39cae442ec8569346e38038c4a61360cdf5fe74;hb=ff91b644fb1b063d0a8eff7492beb1a9bf7e4ce1;hp=ebfd779e1a2dc3ced834fcd76f8ec5e467e5ee91;hpb=ed10645c2f3a40fcfd3bd8738ef6a08e53e114b4;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/helpers/comment-model.ts b/server/tests/helpers/comment-model.ts index ebfd779e1..e39cae442 100644 --- a/server/tests/helpers/comment-model.ts +++ b/server/tests/helpers/comment-model.ts @@ -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' ]) })