aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/notifications/user-notifications.ts2
-rw-r--r--server/tests/api/server/tracker.ts6
2 files changed, 4 insertions, 4 deletions
diff --git a/server/tests/api/notifications/user-notifications.ts b/server/tests/api/notifications/user-notifications.ts
index 2a632e16f..625e344fa 100644
--- a/server/tests/api/notifications/user-notifications.ts
+++ b/server/tests/api/notifications/user-notifications.ts
@@ -63,7 +63,7 @@ import { addUserSubscription, removeUserSubscription } from '../../../../shared/
63import { VideoPrivacy } from '../../../../shared/models/videos' 63import { VideoPrivacy } from '../../../../shared/models/videos'
64import { getBadVideoUrl, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports' 64import { getBadVideoUrl, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports'
65import { addVideoCommentReply, addVideoCommentThread } from '../../../../shared/extra-utils/videos/video-comments' 65import { addVideoCommentReply, addVideoCommentThread } from '../../../../shared/extra-utils/videos/video-comments'
66import * as uuidv4 from 'uuid/v4' 66import { v4 as uuidv4 } from 'uuid'
67import { addAccountToAccountBlocklist, removeAccountFromAccountBlocklist } from '../../../../shared/extra-utils/users/blocklist' 67import { addAccountToAccountBlocklist, removeAccountFromAccountBlocklist } from '../../../../shared/extra-utils/users/blocklist'
68import { CustomConfig } from '../../../../shared/models/server' 68import { CustomConfig } from '../../../../shared/models/server'
69import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' 69import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
diff --git a/server/tests/api/server/tracker.ts b/server/tests/api/server/tracker.ts
index 9d3a274d4..611d5254a 100644
--- a/server/tests/api/server/tracker.ts
+++ b/server/tests/api/server/tracker.ts
@@ -49,7 +49,7 @@ describe('Test tracker', function () {
49 torrent.on('error', done) 49 torrent.on('error', done)
50 torrent.on('warning', warn => { 50 torrent.on('warning', warn => {
51 const message = typeof warn === 'string' ? warn : warn.message 51 const message = typeof warn === 'string' ? warn : warn.message
52 if (message.indexOf('Unknown infoHash ') !== -1) return done() 52 if (message.includes('Unknown infoHash ')) return done()
53 }) 53 })
54 54
55 torrent.on('done', () => done(new Error('No error on infohash'))) 55 torrent.on('done', () => done(new Error('No error on infohash')))
@@ -64,7 +64,7 @@ describe('Test tracker', function () {
64 torrent.on('error', done) 64 torrent.on('error', done)
65 torrent.on('warning', warn => { 65 torrent.on('warning', warn => {
66 const message = typeof warn === 'string' ? warn : warn.message 66 const message = typeof warn === 'string' ? warn : warn.message
67 if (message.indexOf('Unknown infoHash ') !== -1) return done(new Error('Error on infohash')) 67 if (message.includes('Unknown infoHash ')) return done(new Error('Error on infohash'))
68 }) 68 })
69 69
70 torrent.on('done', done) 70 torrent.on('done', done)
@@ -83,7 +83,7 @@ describe('Test tracker', function () {
83 torrent.on('error', done) 83 torrent.on('error', done)
84 torrent.on('warning', warn => { 84 torrent.on('warning', warn => {
85 const message = typeof warn === 'string' ? warn : warn.message 85 const message = typeof warn === 'string' ? warn : warn.message
86 if (message.indexOf('disabled ') !== -1) return done() 86 if (message.includes('disabled ')) return done()
87 }) 87 })
88 88
89 torrent.on('done', () => done(new Error('Tracker is enabled'))) 89 torrent.on('done', () => done(new Error('Tracker is enabled')))