Skip to content

Commit

Permalink
add and fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yairans committed Feb 2, 2021
1 parent ff4c602 commit 17c2960
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/src/common/utils/thumbs.spec.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import {getThumbSlicesUrl} from '../../../../src/common/utils/thumbs';
import {MediaType} from '@playkit-js/playkit-js';

describe('getThumbSlicesUrl', function () {
const fakeData = {
sources: {
poster: '//my-thumb-service.com/p/1/thumbnail/entry_id/2/version/3'
poster: '//my-thumb-service.com/p/1/thumbnail/entry_id/2/version/3',
type: MediaType.VOD
},
session: {
ks: 'my-ks'
Expand Down Expand Up @@ -32,4 +34,9 @@ describe('getThumbSlicesUrl', function () {
fakeData.sources.poster = '//my-thumb-service.com/p/1/entry_id/2/version/3';
getThumbSlicesUrl(fakeData, fakeUIConfig).should.equals(``);
});

it('should get empty thumbnail slices url for live content', function () {
fakeData.sources.type = MediaType.LIVE;
getThumbSlicesUrl(fakeData, fakeUIConfig).should.equals(``);
});
});

0 comments on commit 17c2960

Please sign in to comment.