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/parseAttributes.test.js
Daniel 2a9630258f https://github.com/WWBN/AVideo/issues/6345#issuecomment-1067056556
Also check the lang in case insensitive
2022-03-14 14:28:38 -03:00

21 lines
523 B
JavaScript

import {JSDOM} from 'jsdom';
import QUnit from 'qunit';
import { parseAttributes } from '../src/parseAttributes';
const document = new JSDOM().window.document;
QUnit.module('parseAttributes');
QUnit.test('simple', function(assert) {
const el = document.createElement('el');
el.setAttribute('foo', 1);
assert.deepEqual(parseAttributes(el), { foo: '1' });
});
QUnit.test('empty', function(assert) {
const el = document.createElement('el');
assert.deepEqual(parseAttributes(el), {});
});