diff options
Diffstat (limited to 'server/tests/api')
-rw-r--r-- | server/tests/api/notifications/user-notifications.ts | 2 | ||||
-rw-r--r-- | server/tests/api/server/tracker.ts | 6 |
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/ | |||
63 | import { VideoPrivacy } from '../../../../shared/models/videos' | 63 | import { VideoPrivacy } from '../../../../shared/models/videos' |
64 | import { getBadVideoUrl, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports' | 64 | import { getBadVideoUrl, getYoutubeVideoUrl, importVideo } from '../../../../shared/extra-utils/videos/video-imports' |
65 | import { addVideoCommentReply, addVideoCommentThread } from '../../../../shared/extra-utils/videos/video-comments' | 65 | import { addVideoCommentReply, addVideoCommentThread } from '../../../../shared/extra-utils/videos/video-comments' |
66 | import * as uuidv4 from 'uuid/v4' | 66 | import { v4 as uuidv4 } from 'uuid' |
67 | import { addAccountToAccountBlocklist, removeAccountFromAccountBlocklist } from '../../../../shared/extra-utils/users/blocklist' | 67 | import { addAccountToAccountBlocklist, removeAccountFromAccountBlocklist } from '../../../../shared/extra-utils/users/blocklist' |
68 | import { CustomConfig } from '../../../../shared/models/server' | 68 | import { CustomConfig } from '../../../../shared/models/server' |
69 | import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' | 69 | import { 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'))) |