Skip to content

Commit

Permalink
Re-enabled skipped test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisn committed Aug 22, 2017
1 parent 6088169 commit 38e7da9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions test/unit/api-player-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('Peaks.player', function() {
}
});

describe.skip('getCurrentTime', function() {
describe('getCurrentTime', function() {
var newTime = 6.0;

it('should return the actual value of the audio element', function() {
Expand All @@ -40,22 +40,23 @@ describe('Peaks.player', function() {
// For some reason, the event is not emitted during the tests
it('should return an updated time if it has been modified through the audio element', function(done) {
p.on('player_seek', function(currentTime) {
expect(p.player.getCurrentTime()).to.equal(newTime);
expect(currentTime).to.equal(newTime);
var diff = Math.abs(p.player.getCurrentTime() - newTime);
expect(diff).to.be.lessThan(0.2);
done();
});

document.querySelector('audio').currentTime = newTime;
});
});

describe.skip('seek', function() {
describe('seek', function() {
var newTime = 6.0;

it('should change the currentTime value of the audio element', function() {
p.player.seek(newTime);

expect(p.player.getCurrentTime()).to.equal(newTime);
var diff = Math.abs(p.player.getCurrentTime() - newTime);
expect(diff).to.be.lessThan(0.2);
});
});

Expand Down
2 changes: 1 addition & 1 deletion test/unit/api-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ describe('Peaks', function() {
});
});

it.skip('should emit an error if the data handling fails due to a network error', function(done) {
it('should emit an error if the data handling fails due to a network error', function(done) {
p = Peaks.init({
container: document.getElementById('waveform-visualiser-container'),
mediaElement: document.querySelector('audio'),
Expand Down

0 comments on commit 38e7da9

Please sign in to comment.