Skip to content

Commit

Permalink
Use a fake error to avoid exceptions in tests.
Browse files Browse the repository at this point in the history
Promise.reject() was causing error.type to be undefined in
the final catch block of StreamVideoSource.onUpdateManifest_().

Change-Id: Id5ddf8901e38559889e41d389b96c620b3dfaaa7
  • Loading branch information
Timothy Drews committed Jun 9, 2015
1 parent 22c57e9 commit 96b369e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec/live_integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ describe('Player', function() {
var request = new MpdRequest(mpdUrl);
spyOn(request, 'send').and.callFake(function() {
requestStatus.resolve();
return Promise.reject();
var error = new Error();
error.type = 'fake';
return Promise.reject(error);
});
return request;
});
Expand Down

0 comments on commit 96b369e

Please sign in to comment.