1 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
3 import { expect } from 'chai'
6 PeerTubeProblemDocument,
12 } from '@shared/models'
15 createMultipleServers,
21 setAccessTokensToServers,
22 setDefaultVideoChannel,
24 } from '@shared/server-commands'
25 import { FIXTURE_URLS } from '../shared'
27 describe('Test plugin filter hooks', function () {
28 let servers: PeerTubeServer[]
31 let videoPlaylistUUID: string
33 before(async function () {
36 servers = await createMultipleServers(2)
37 await setAccessTokensToServers(servers)
38 await setDefaultVideoChannel(servers)
39 await doubleFollow(servers[0], servers[1])
41 await servers[0].plugins.install({ path: PluginsCommand.getPluginTestPath() })
42 await servers[0].plugins.install({ path: PluginsCommand.getPluginTestPath('-filter-translations') })
44 ({ uuid: videoPlaylistUUID } = await servers[0].playlists.create({
46 displayName: 'my super playlist',
47 privacy: VideoPlaylistPrivacy.PUBLIC,
48 description: 'my super description',
49 videoChannelId: servers[0].store.channel.id
54 for (let i = 0; i < 10; i++) {
55 const video = await servers[0].videos.upload({ attributes: { name: 'default video ' + i } })
56 await servers[0].playlists.addElement({ playlistId: videoPlaylistUUID, attributes: { videoId: video.id } })
59 const { data } = await servers[0].videos.list()
60 videoUUID = data[0].uuid
62 await servers[0].config.updateCustomSubConfig({
64 live: { enabled: true },
65 signup: { enabled: true },
68 http: { enabled: true },
69 torrent: { enabled: true }
76 describe('Videos', function () {
78 it('Should run filter:api.videos.list.params', async function () {
79 const { data } = await servers[0].videos.list({ start: 0, count: 2 })
81 // 2 plugins do +1 to the count parameter
82 expect(data).to.have.lengthOf(4)
85 it('Should run filter:api.videos.list.result', async function () {
86 const { total } = await servers[0].videos.list({ start: 0, count: 0 })
88 // Plugin do +1 to the total result
89 expect(total).to.equal(11)
92 it('Should run filter:api.video-playlist.videos.list.params', async function () {
93 const { data } = await servers[0].playlists.listVideos({
95 playlistId: videoPlaylistUUID
98 // 1 plugin do +1 to the count parameter
99 expect(data).to.have.lengthOf(3)
102 it('Should run filter:api.video-playlist.videos.list.result', async function () {
103 const { total } = await servers[0].playlists.listVideos({
105 playlistId: videoPlaylistUUID
108 // Plugin do +1 to the total result
109 expect(total).to.equal(11)
112 it('Should run filter:api.accounts.videos.list.params', async function () {
113 const { data } = await servers[0].videos.listByAccount({ handle: 'root', start: 0, count: 2 })
115 // 1 plugin do +1 to the count parameter
116 expect(data).to.have.lengthOf(3)
119 it('Should run filter:api.accounts.videos.list.result', async function () {
120 const { total } = await servers[0].videos.listByAccount({ handle: 'root', start: 0, count: 2 })
122 // Plugin do +2 to the total result
123 expect(total).to.equal(12)
126 it('Should run filter:api.video-channels.videos.list.params', async function () {
127 const { data } = await servers[0].videos.listByChannel({ handle: 'root_channel', start: 0, count: 2 })
129 // 1 plugin do +3 to the count parameter
130 expect(data).to.have.lengthOf(5)
133 it('Should run filter:api.video-channels.videos.list.result', async function () {
134 const { total } = await servers[0].videos.listByChannel({ handle: 'root_channel', start: 0, count: 2 })
136 // Plugin do +3 to the total result
137 expect(total).to.equal(13)
140 it('Should run filter:api.user.me.videos.list.params', async function () {
141 const { data } = await servers[0].videos.listMyVideos({ start: 0, count: 2 })
143 // 1 plugin do +4 to the count parameter
144 expect(data).to.have.lengthOf(6)
147 it('Should run filter:api.user.me.videos.list.result', async function () {
148 const { total } = await servers[0].videos.listMyVideos({ start: 0, count: 2 })
150 // Plugin do +4 to the total result
151 expect(total).to.equal(14)
154 it('Should run filter:api.video.get.result', async function () {
155 const video = await servers[0].videos.get({ id: videoUUID })
156 expect(video.name).to.contain('<3')
160 describe('Video/live/import accept', function () {
162 it('Should run filter:api.video.upload.accept.result', async function () {
163 await servers[0].videos.upload({ attributes: { name: 'video with bad word' }, expectedStatus: HttpStatusCode.FORBIDDEN_403 })
166 it('Should run filter:api.live-video.create.accept.result', async function () {
168 name: 'video with bad word',
169 privacy: VideoPrivacy.PUBLIC,
170 channelId: servers[0].store.channel.id
173 await servers[0].live.create({ fields: attributes, expectedStatus: HttpStatusCode.FORBIDDEN_403 })
176 it('Should run filter:api.video.pre-import-url.accept.result', async function () {
178 name: 'normal title',
179 privacy: VideoPrivacy.PUBLIC,
180 channelId: servers[0].store.channel.id,
181 targetUrl: FIXTURE_URLS.goodVideo + 'bad'
183 await servers[0].imports.importVideo({ attributes, expectedStatus: HttpStatusCode.FORBIDDEN_403 })
186 it('Should run filter:api.video.pre-import-torrent.accept.result', async function () {
189 privacy: VideoPrivacy.PUBLIC,
190 channelId: servers[0].store.channel.id,
191 torrentfile: 'video-720p.torrent' as any
193 await servers[0].imports.importVideo({ attributes, expectedStatus: HttpStatusCode.FORBIDDEN_403 })
196 it('Should run filter:api.video.post-import-url.accept.result', async function () {
199 let videoImportId: number
203 name: 'title with bad word',
204 privacy: VideoPrivacy.PUBLIC,
205 channelId: servers[0].store.channel.id,
206 targetUrl: FIXTURE_URLS.goodVideo
208 const body = await servers[0].imports.importVideo({ attributes })
209 videoImportId = body.id
212 await waitJobs(servers)
215 const body = await servers[0].imports.getMyVideoImports()
216 const videoImports = body.data
218 const videoImport = videoImports.find(i => i.id === videoImportId)
220 expect(videoImport.state.id).to.equal(VideoImportState.REJECTED)
221 expect(videoImport.state.label).to.equal('Rejected')
225 it('Should run filter:api.video.post-import-torrent.accept.result', async function () {
228 let videoImportId: number
232 name: 'title with bad word',
233 privacy: VideoPrivacy.PUBLIC,
234 channelId: servers[0].store.channel.id,
235 torrentfile: 'video-720p.torrent' as any
237 const body = await servers[0].imports.importVideo({ attributes })
238 videoImportId = body.id
241 await waitJobs(servers)
244 const { data: videoImports } = await servers[0].imports.getMyVideoImports()
246 const videoImport = videoImports.find(i => i.id === videoImportId)
248 expect(videoImport.state.id).to.equal(VideoImportState.REJECTED)
249 expect(videoImport.state.label).to.equal('Rejected')
254 describe('Video comments accept', function () {
256 it('Should run filter:api.video-thread.create.accept.result', async function () {
257 await servers[0].comments.createThread({
259 text: 'comment with bad word',
260 expectedStatus: HttpStatusCode.FORBIDDEN_403
264 it('Should run filter:api.video-comment-reply.create.accept.result', async function () {
265 const created = await servers[0].comments.createThread({ videoId: videoUUID, text: 'thread' })
266 threadId = created.id
268 await servers[0].comments.addReply({
270 toCommentId: threadId,
271 text: 'comment with bad word',
272 expectedStatus: HttpStatusCode.FORBIDDEN_403
274 await servers[0].comments.addReply({
276 toCommentId: threadId,
277 text: 'comment with good word',
278 expectedStatus: HttpStatusCode.OK_200
282 it('Should run filter:activity-pub.remote-video-comment.create.accept.result on a thread creation', async function () {
285 await servers[1].comments.createThread({ videoId: videoUUID, text: 'comment with bad word' })
287 await waitJobs(servers)
290 const thread = await servers[0].comments.listThreads({ videoId: videoUUID })
291 expect(thread.data).to.have.lengthOf(1)
292 expect(thread.data[0].text).to.not.include(' bad ')
296 const thread = await servers[1].comments.listThreads({ videoId: videoUUID })
297 expect(thread.data).to.have.lengthOf(2)
301 it('Should run filter:activity-pub.remote-video-comment.create.accept.result on a reply creation', async function () {
304 const { data } = await servers[1].comments.listThreads({ videoId: videoUUID })
305 const threadIdServer2 = data.find(t => t.text === 'thread').id
307 await servers[1].comments.addReply({
309 toCommentId: threadIdServer2,
310 text: 'comment with bad word'
313 await waitJobs(servers)
316 const tree = await servers[0].comments.getThread({ videoId: videoUUID, threadId })
317 expect(tree.children).to.have.lengthOf(1)
318 expect(tree.children[0].comment.text).to.not.include(' bad ')
322 const tree = await servers[1].comments.getThread({ videoId: videoUUID, threadId: threadIdServer2 })
323 expect(tree.children).to.have.lengthOf(2)
328 describe('Video comments', function () {
330 it('Should run filter:api.video-threads.list.params', async function () {
331 const { data } = await servers[0].comments.listThreads({ videoId: videoUUID, start: 0, count: 0 })
333 // our plugin do +1 to the count parameter
334 expect(data).to.have.lengthOf(1)
337 it('Should run filter:api.video-threads.list.result', async function () {
338 const { total } = await servers[0].comments.listThreads({ videoId: videoUUID, start: 0, count: 0 })
340 // Plugin do +1 to the total result
341 expect(total).to.equal(2)
344 it('Should run filter:api.video-thread-comments.list.params')
346 it('Should run filter:api.video-thread-comments.list.result', async function () {
347 const thread = await servers[0].comments.getThread({ videoId: videoUUID, threadId })
349 expect(thread.comment.text.endsWith(' <3')).to.be.true
352 it('Should run filter:api.overviews.videos.list.{params,result}', async function () {
353 await servers[0].overviews.getVideos({ page: 1 })
355 // 3 because we get 3 samples per page
356 await servers[0].servers.waitUntilLog('Run hook filter:api.overviews.videos.list.params', 3)
357 await servers[0].servers.waitUntilLog('Run hook filter:api.overviews.videos.list.result', 3)
361 describe('filter:video.auto-blacklist.result', function () {
363 async function checkIsBlacklisted (id: number | string, value: boolean) {
364 const video = await servers[0].videos.getWithToken({ id })
365 expect(video.blacklisted).to.equal(value)
368 it('Should blacklist on upload', async function () {
369 const { uuid } = await servers[0].videos.upload({ attributes: { name: 'video please blacklist me' } })
370 await checkIsBlacklisted(uuid, true)
373 it('Should blacklist on import', async function () {
377 name: 'video please blacklist me',
378 targetUrl: FIXTURE_URLS.goodVideo,
379 channelId: servers[0].store.channel.id
381 const body = await servers[0].imports.importVideo({ attributes })
382 await checkIsBlacklisted(body.video.uuid, true)
385 it('Should blacklist on update', async function () {
386 const { uuid } = await servers[0].videos.upload({ attributes: { name: 'video' } })
387 await checkIsBlacklisted(uuid, false)
389 await servers[0].videos.update({ id: uuid, attributes: { name: 'please blacklist me' } })
390 await checkIsBlacklisted(uuid, true)
393 it('Should blacklist on remote upload', async function () {
396 const { uuid } = await servers[1].videos.upload({ attributes: { name: 'remote please blacklist me' } })
397 await waitJobs(servers)
399 await checkIsBlacklisted(uuid, true)
402 it('Should blacklist on remote update', async function () {
405 const { uuid } = await servers[1].videos.upload({ attributes: { name: 'video' } })
406 await waitJobs(servers)
408 await checkIsBlacklisted(uuid, false)
410 await servers[1].videos.update({ id: uuid, attributes: { name: 'please blacklist me' } })
411 await waitJobs(servers)
413 await checkIsBlacklisted(uuid, true)
417 describe('Should run filter:api.user.signup.allowed.result', function () {
419 before(async function () {
420 await servers[0].config.updateExistingSubConfig({ newConfig: { signup: { requiresApproval: false } } })
423 it('Should run on config endpoint', async function () {
424 const body = await servers[0].config.getConfig()
425 expect(body.signup.allowed).to.be.true
428 it('Should allow a signup', async function () {
429 await servers[0].registrations.register({ username: 'john1' })
432 it('Should not allow a signup', async function () {
433 const res = await servers[0].registrations.register({
435 expectedStatus: HttpStatusCode.FORBIDDEN_403
438 expect(res.body.error).to.equal('No jma 1')
442 describe('Should run filter:api.user.request-signup.allowed.result', function () {
444 before(async function () {
445 await servers[0].config.updateExistingSubConfig({ newConfig: { signup: { requiresApproval: true } } })
448 it('Should run on config endpoint', async function () {
449 const body = await servers[0].config.getConfig()
450 expect(body.signup.allowed).to.be.true
453 it('Should allow a signup request', async function () {
454 await servers[0].registrations.requestRegistration({ username: 'john2', registrationReason: 'tt' })
457 it('Should not allow a signup request', async function () {
458 const body = await servers[0].registrations.requestRegistration({
460 registrationReason: 'tt',
461 expectedStatus: HttpStatusCode.FORBIDDEN_403
464 expect((body as unknown as PeerTubeProblemDocument).error).to.equal('No jma 2')
468 describe('Download hooks', function () {
469 const downloadVideos: VideoDetails[] = []
470 let downloadVideo2Token: string
472 before(async function () {
475 await servers[0].config.updateCustomSubConfig({
488 const uuids: string[] = []
490 for (const name of [ 'bad torrent', 'bad file', 'bad playlist file' ]) {
491 const uuid = (await servers[0].videos.quickUpload({ name })).uuid
495 await waitJobs(servers)
497 for (const uuid of uuids) {
498 downloadVideos.push(await servers[0].videos.get({ id: uuid }))
501 downloadVideo2Token = await servers[0].videoToken.getVideoFileToken({ videoId: downloadVideos[2].uuid })
504 it('Should run filter:api.download.torrent.allowed.result', async function () {
505 const res = await makeRawRequest({ url: downloadVideos[0].files[0].torrentDownloadUrl, expectedStatus: HttpStatusCode.FORBIDDEN_403 })
506 expect(res.body.error).to.equal('Liu Bei')
508 await makeRawRequest({ url: downloadVideos[1].files[0].torrentDownloadUrl, expectedStatus: HttpStatusCode.OK_200 })
509 await makeRawRequest({ url: downloadVideos[2].files[0].torrentDownloadUrl, expectedStatus: HttpStatusCode.OK_200 })
512 it('Should run filter:api.download.video.allowed.result', async function () {
514 const refused = downloadVideos[1].files[0].fileDownloadUrl
516 downloadVideos[0].files[0].fileDownloadUrl,
517 downloadVideos[2].files[0].fileDownloadUrl
520 const res = await makeRawRequest({ url: refused, expectedStatus: HttpStatusCode.FORBIDDEN_403 })
521 expect(res.body.error).to.equal('Cao Cao')
523 for (const url of allowed) {
524 await makeRawRequest({ url, expectedStatus: HttpStatusCode.OK_200 })
525 await makeRawRequest({ url, expectedStatus: HttpStatusCode.OK_200 })
530 const refused = downloadVideos[2].streamingPlaylists[0].files[0].fileDownloadUrl
533 downloadVideos[2].files[0].fileDownloadUrl,
534 downloadVideos[0].streamingPlaylists[0].files[0].fileDownloadUrl,
535 downloadVideos[1].streamingPlaylists[0].files[0].fileDownloadUrl
538 // Only streaming playlist is refuse
539 const res = await makeRawRequest({ url: refused, expectedStatus: HttpStatusCode.FORBIDDEN_403 })
540 expect(res.body.error).to.equal('Sun Jian')
542 // But not we there is a user in res
543 await makeRawRequest({ url: refused, token: servers[0].accessToken, expectedStatus: HttpStatusCode.OK_200 })
544 await makeRawRequest({ url: refused, query: { videoFileToken: downloadVideo2Token }, expectedStatus: HttpStatusCode.OK_200 })
547 for (const url of allowed) {
548 await makeRawRequest({ url, expectedStatus: HttpStatusCode.OK_200 })
554 describe('Embed filters', function () {
555 const embedVideos: VideoDetails[] = []
556 const embedPlaylists: VideoPlaylist[] = []
558 before(async function () {
561 await servers[0].config.disableTranscoding()
563 for (const name of [ 'bad embed', 'good embed' ]) {
565 const uuid = (await servers[0].videos.quickUpload({ name })).uuid
566 embedVideos.push(await servers[0].videos.get({ id: uuid }))
570 const attributes = { displayName: name, videoChannelId: servers[0].store.channel.id, privacy: VideoPlaylistPrivacy.PUBLIC }
571 const { id } = await servers[0].playlists.create({ attributes })
573 const playlist = await servers[0].playlists.get({ playlistId: id })
574 embedPlaylists.push(playlist)
579 it('Should run filter:html.embed.video.allowed.result', async function () {
580 const res = await makeGetRequest({ url: servers[0].url, path: embedVideos[0].embedPath, expectedStatus: HttpStatusCode.OK_200 })
581 expect(res.text).to.equal('Lu Bu')
584 it('Should run filter:html.embed.video-playlist.allowed.result', async function () {
585 const res = await makeGetRequest({ url: servers[0].url, path: embedPlaylists[0].embedPath, expectedStatus: HttpStatusCode.OK_200 })
586 expect(res.text).to.equal('Diao Chan')
590 describe('Search filters', function () {
592 before(async function () {
593 await servers[0].config.updateCustomSubConfig({
598 isDefaultSearch: false,
599 disableLocalSearch: false
606 it('Should run filter:api.search.videos.local.list.{params,result}', async function () {
607 await servers[0].search.advancedVideoSearch({
613 await servers[0].servers.waitUntilLog('Run hook filter:api.search.videos.local.list.params', 1)
614 await servers[0].servers.waitUntilLog('Run hook filter:api.search.videos.local.list.result', 1)
617 it('Should run filter:api.search.videos.index.list.{params,result}', async function () {
618 await servers[0].search.advancedVideoSearch({
621 searchTarget: 'search-index'
625 await servers[0].servers.waitUntilLog('Run hook filter:api.search.videos.local.list.params', 1)
626 await servers[0].servers.waitUntilLog('Run hook filter:api.search.videos.local.list.result', 1)
627 await servers[0].servers.waitUntilLog('Run hook filter:api.search.videos.index.list.params', 1)
628 await servers[0].servers.waitUntilLog('Run hook filter:api.search.videos.index.list.result', 1)
631 it('Should run filter:api.search.video-channels.local.list.{params,result}', async function () {
632 await servers[0].search.advancedChannelSearch({
638 await servers[0].servers.waitUntilLog('Run hook filter:api.search.video-channels.local.list.params', 1)
639 await servers[0].servers.waitUntilLog('Run hook filter:api.search.video-channels.local.list.result', 1)
642 it('Should run filter:api.search.video-channels.index.list.{params,result}', async function () {
643 await servers[0].search.advancedChannelSearch({
646 searchTarget: 'search-index'
650 await servers[0].servers.waitUntilLog('Run hook filter:api.search.video-channels.local.list.params', 1)
651 await servers[0].servers.waitUntilLog('Run hook filter:api.search.video-channels.local.list.result', 1)
652 await servers[0].servers.waitUntilLog('Run hook filter:api.search.video-channels.index.list.params', 1)
653 await servers[0].servers.waitUntilLog('Run hook filter:api.search.video-channels.index.list.result', 1)
656 it('Should run filter:api.search.video-playlists.local.list.{params,result}', async function () {
657 await servers[0].search.advancedPlaylistSearch({
663 await servers[0].servers.waitUntilLog('Run hook filter:api.search.video-playlists.local.list.params', 1)
664 await servers[0].servers.waitUntilLog('Run hook filter:api.search.video-playlists.local.list.result', 1)
667 it('Should run filter:api.search.video-playlists.index.list.{params,result}', async function () {
668 await servers[0].search.advancedPlaylistSearch({
671 searchTarget: 'search-index'
675 await servers[0].servers.waitUntilLog('Run hook filter:api.search.video-playlists.local.list.params', 1)
676 await servers[0].servers.waitUntilLog('Run hook filter:api.search.video-playlists.local.list.result', 1)
677 await servers[0].servers.waitUntilLog('Run hook filter:api.search.video-playlists.index.list.params', 1)
678 await servers[0].servers.waitUntilLog('Run hook filter:api.search.video-playlists.index.list.result', 1)
682 describe('Upload/import/live attributes filters', function () {
684 before(async function () {
685 await servers[0].config.enableLive({ transcoding: false, allowReplay: false })
686 await servers[0].config.enableImports()
687 await servers[0].config.disableTranscoding()
690 it('Should run filter:api.video.upload.video-attribute.result', async function () {
691 for (const mode of [ 'legacy' as 'legacy', 'resumable' as 'resumable' ]) {
692 const { id } = await servers[0].videos.upload({ attributes: { name: 'video', description: 'upload' }, mode })
694 const video = await servers[0].videos.get({ id })
695 expect(video.description).to.equal('upload - filter:api.video.upload.video-attribute.result')
699 it('Should run filter:api.video.import-url.video-attribute.result', async function () {
702 description: 'import url',
703 channelId: servers[0].store.channel.id,
704 targetUrl: FIXTURE_URLS.goodVideo,
705 privacy: VideoPrivacy.PUBLIC
707 const { video: { id } } = await servers[0].imports.importVideo({ attributes })
709 const video = await servers[0].videos.get({ id })
710 expect(video.description).to.equal('import url - filter:api.video.import-url.video-attribute.result')
713 it('Should run filter:api.video.import-torrent.video-attribute.result', async function () {
716 description: 'import torrent',
717 channelId: servers[0].store.channel.id,
718 magnetUri: FIXTURE_URLS.magnet,
719 privacy: VideoPrivacy.PUBLIC
721 const { video: { id } } = await servers[0].imports.importVideo({ attributes })
723 const video = await servers[0].videos.get({ id })
724 expect(video.description).to.equal('import torrent - filter:api.video.import-torrent.video-attribute.result')
727 it('Should run filter:api.video.live.video-attribute.result', async function () {
731 channelId: servers[0].store.channel.id,
732 privacy: VideoPrivacy.PUBLIC
734 const { id } = await servers[0].live.create({ fields })
736 const video = await servers[0].videos.get({ id })
737 expect(video.description).to.equal('live - filter:api.video.live.video-attribute.result')
741 describe('Stats filters', function () {
743 it('Should run filter:api.server.stats.get.result', async function () {
744 const data = await servers[0].stats.get()
746 expect((data as any).customStats).to.equal(14)
751 describe('Job queue filters', function () {
752 let videoUUID: string
754 before(async function () {
755 this.timeout(120_000)
757 await servers[0].config.enableMinimumTranscoding()
758 const { uuid } = await servers[0].videos.quickUpload({ name: 'studio' })
760 const video = await servers[0].videos.get({ id: uuid })
761 expect(video.duration).at.least(2)
762 videoUUID = video.uuid
764 await waitJobs(servers)
766 await servers[0].config.enableStudio()
769 it('Should run filter:job-queue.process.params', async function () {
770 this.timeout(120_000)
772 await servers[0].videoStudio.createEditionTasks({
778 file: 'video_very_short_240p.mp4'
784 await waitJobs(servers)
786 await servers[0].servers.waitUntilLog('Run hook filter:job-queue.process.params', 1, false)
788 const video = await servers[0].videos.get({ id: videoUUID })
789 expect(video.duration).at.most(2)
792 it('Should run filter:job-queue.process.result', async function () {
793 await servers[0].servers.waitUntilLog('Run hook filter:job-queue.process.result', 1, false)
797 describe('Transcoding filters', async function () {
799 it('Should run filter:transcoding.auto.resolutions-to-transcode.result', async function () {
800 const { uuid } = await servers[0].videos.quickUpload({ name: 'transcode-filter' })
802 await waitJobs(servers)
804 const video = await servers[0].videos.get({ id: uuid })
805 expect(video.files).to.have.lengthOf(2)
806 expect(video.files.find(f => f.resolution.id === 100 as any)).to.exist
810 describe('Video channel filters', async function () {
812 it('Should run filter:api.video-channels.list.params', async function () {
813 const { data } = await servers[0].channels.list({ start: 0, count: 0 })
815 // plugin do +1 to the count parameter
816 expect(data).to.have.lengthOf(1)
819 it('Should run filter:api.video-channels.list.result', async function () {
820 const { total } = await servers[0].channels.list({ start: 0, count: 1 })
822 // plugin do +1 to the total parameter
823 expect(total).to.equal(4)
826 it('Should run filter:api.video-channel.get.result', async function () {
827 const channel = await servers[0].channels.get({ channelName: 'root_channel' })
828 expect(channel.displayName).to.equal('Main root channel <3')
832 after(async function () {
833 await cleanupTests(servers)