import {createElementFromAttrs, createElementFromHTML} from './dom.ts'; test('createElementFromHTML', () => { expect(createElementFromHTML('foobar').outerHTML).toEqual('foobar'); }); test('createElementFromAttrs', () => { const el = createElementFromAttrs('button', { id: 'the-id', class: 'cls-1 cls-2', disabled: true, checked: false, required: null, tabindex: 0, 'data-foo': 'the-data', }, 'txt', createElementFromHTML('inner')); expect(el.outerHTML).toEqual(''); });