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
502 B

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), {});
});