Skip to content

Commit

Permalink
update TextBufferController unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
nicosang committed Aug 10, 2017
1 parent 8fc9e31 commit 31eb681
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/unit/streaming.text.TextBufferController.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,28 @@ const expect = chai.expect;

const context = {};

class SourceBufferControllerMock {
constructor() {
}

abort() {
}

removeSourceBuffer() {
}
}

describe('TextBufferController', function () {

let textBufferController;

it('should create a buffer of type "BufferController" if type is "fragmentedText"', function () {

let sourceBufferMock = new SourceBufferControllerMock('fragmentedText');

textBufferController = TextBufferController(context).create({
type: 'fragmentedText'
type: 'fragmentedText',
sourceBufferController: sourceBufferMock,
});

expect(textBufferController.getBufferControllerType()).to.equal('BufferController');
Expand Down

0 comments on commit 31eb681

Please sign in to comment.