You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
679 B
22 lines
679 B
import { stringToMpdXml } from '../src/stringToMpdXml';
|
|
import errors from '../src/errors';
|
|
import QUnit from 'qunit';
|
|
|
|
QUnit.module('stringToMpdXml');
|
|
|
|
QUnit.test('simple mpd', function(assert) {
|
|
assert.deepEqual(stringToMpdXml('<MPD></MPD>').tagName, 'MPD');
|
|
});
|
|
|
|
QUnit.test('invalid xml', function(assert) {
|
|
assert.throws(() => stringToMpdXml('<test'), new RegExp(errors.DASH_INVALID_XML));
|
|
});
|
|
|
|
QUnit.test('invalid manifest', function(assert) {
|
|
assert.throws(() => stringToMpdXml('<test>'), new RegExp(errors.DASH_INVALID_XML));
|
|
});
|
|
|
|
QUnit.test('empty manifest', function(assert) {
|
|
assert.throws(() => stringToMpdXml(''), new RegExp(errors.DASH_EMPTY_MANIFEST));
|
|
});
|