1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 02:09:22 +02:00
Oinktube/node_modules/mpd-parser/test/segment/durationTimeParser.test.js
Daniel d4d042e041 Moving to node_modules folder to make easier to upgrade
trying to move from Bootstrap 3 to Bootstrap 5
2021-10-26 14:52:45 -03:00

29 lines
701 B
JavaScript

import QUnit from 'qunit';
import { segmentRange } from '../../src/segment/durationTimeParser.js';
QUnit.module('segmentRange');
QUnit.test('static range uses periodDuration if available', function(assert) {
assert.deepEqual(
segmentRange.static({
periodDuration: 10,
sourceDuration: 20,
duration: 2,
timescale: 1
}),
{ start: 0, end: 5 },
'uses periodDuration if available'
);
});
QUnit.test('static range uses sourceDuration if available', function(assert) {
assert.deepEqual(
segmentRange.static({
sourceDuration: 20,
duration: 2,
timescale: 1
}),
{ start: 0, end: 10 },
'uses periodDuration if available'
);
});