Skip to content

Commit

Permalink
Improve functional test assertion feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Walch committed Dec 3, 2019
1 parent 4fb2206 commit 8c8fc31
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/functional/auto/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ async function testLoadedData (url, config) {
url,
config
);
expect(result.code).to.equal('loadeddata');
expect(result, JSON.stringify(result, null, 2)).to.have.property('code').which.equals('loadeddata');
}

async function testSmoothSwitch (url, config) {
Expand Down Expand Up @@ -121,7 +121,7 @@ async function testSmoothSwitch (url, config) {
url,
config
);
expect(result.code).to.be.true;
expect(result, JSON.stringify(result, null, 2)).to.have.property('code').which.equals(true);
}

async function testSeekOnLive (url, config) {
Expand All @@ -142,7 +142,7 @@ async function testSeekOnLive (url, config) {
url,
config
);
expect(result.code).to.equal('seeked');
expect(result, JSON.stringify(result, null, 2)).to.have.property('code').which.equals('seeked');
}

async function testSeekOnVOD (url, config) {
Expand All @@ -163,7 +163,7 @@ async function testSeekOnVOD (url, config) {
url,
config
);
expect(result.code).to.equal('ended');
expect(result, JSON.stringify(result, null, 2)).to.have.property('code').which.equals('ended');
}

async function testSeekEndVOD (url, config) {
Expand All @@ -184,7 +184,7 @@ async function testSeekEndVOD (url, config) {
url,
config
);
expect(result.code).to.equal('ended');
expect(result, JSON.stringify(result, null, 2)).to.have.property('code').which.equals('ended');
}

async function testIsPlayingVOD (url, config) {
Expand Down Expand Up @@ -218,7 +218,7 @@ async function testIsPlayingVOD (url, config) {
url,
config
);
expect(result.playing).to.be.true;
expect(result, JSON.stringify(result, null, 2)).to.have.property('playing').which.is.true;
}

async function testSeekBackToStart (url, config) {
Expand Down Expand Up @@ -248,7 +248,7 @@ async function testSeekBackToStart (url, config) {
url,
config
);
expect(result.playing).to.be.true;
expect(result, JSON.stringify(result, null, 2)).to.have.property('playing').which.is.true;
}

describe(`testing hls.js playback in the browser on "${browserDescription}"`, function () {
Expand Down

0 comments on commit 8c8fc31

Please sign in to comment.