Skip to content

Commit 753cd97

Browse files
author
Nir Maoz
authored
Add test for startOffset parameter
1 parent e019bb5 commit 753cd97

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/VideoTest.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,24 @@ describe('Video', () => {
4444
expect(tag.props().src).to.endWith('/fps_25-/dog.webm');
4545
});
4646

47+
it('should support startOffset parameter', function() {
48+
let tag = shallow(
49+
<Video cloudName="demo" sourceTypes={'webm'} publicId="dog">
50+
<Transformation startOffset="auto" />
51+
</Video>);
52+
expect(tag.props().src).to.endWith('/so_auto/dog.webm');
53+
tag = shallow(
54+
<Video cloudName="demo" sourceTypes={'webm'} publicId="dog">
55+
<Transformation startOffset="2" />
56+
</Video>);
57+
expect(tag.props().src).to.endWith('/so_2/dog.webm');
58+
tag = shallow(
59+
<Video cloudName="demo" sourceTypes={'webm'} publicId="dog">
60+
<Transformation startOffset="2.34" />
61+
</Video>);
62+
expect(tag.props().src).to.endWith('/so_2.34/dog.webm');
63+
});
64+
4765
it("should include child transformation for multiple source types", function () {
4866
let tag = shallow(
4967
<Video cloudName='demo'

0 commit comments

Comments
 (0)