1
0
Fork 0

More robust live test

This commit is contained in:
Chocobozzz 2020-11-27 13:47:43 +01:00
parent 992f498e31
commit e5a516e702
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 4 additions and 4 deletions

View File

@ -583,8 +583,8 @@ describe('Test live', function () {
await waitJobs(servers)
for (const stateChanges of [ localStateChanges, remoteStateChanges ]) {
expect(stateChanges).to.have.lengthOf(1)
expect(stateChanges[0]).to.equal(VideoState.PUBLISHED)
expect(stateChanges).to.have.length.at.least(1)
expect(stateChanges[stateChanges.length - 1]).to.equal(VideoState.PUBLISHED)
}
await stopFfmpeg(command)
@ -593,8 +593,8 @@ describe('Test live', function () {
await waitJobs(servers)
for (const stateChanges of [ localStateChanges, remoteStateChanges ]) {
expect(stateChanges).to.have.lengthOf(2)
expect(stateChanges[1]).to.equal(VideoState.LIVE_ENDED)
expect(stateChanges).to.have.length.at.least(2)
expect(stateChanges[stateChanges.length - 1]).to.equal(VideoState.LIVE_ENDED)
}
})