+
+ {
+ const body = await command.advancedVideoSearch({ search: { isLive: true } })
+
+ expect(body.total).to.equal(0)
+ expect(body.data).to.have.lengthOf(0)
+ }
+
+ {
+ const liveCommand = server.liveCommand
+
+ const liveAttributes = { name: 'live', privacy: VideoPrivacy.PUBLIC, channelId: server.videoChannel.id }
+ const live = await liveCommand.create({ fields: liveAttributes })
+
+ const ffmpegCommand = await liveCommand.sendRTMPStreamInVideo({ videoId: live.id })
+ await liveCommand.waitUntilPublished({ videoId: live.id })
+
+ const body = await command.advancedVideoSearch({ search: { isLive: true } })
+
+ expect(body.total).to.equal(1)
+ expect(body.data[0].name).to.equal('live')
+
+ await stopFfmpeg(ffmpegCommand)
+ }
+ })
+
+ after(async function () {
+ await cleanupTests([ server ])