import { expect } from '@open-wc/testing'; import { html } from '@lion/core'; import { renderLitAsNode } from '../src/renderLitAsNode.js'; describe('renderLitAsNode', () => { it('should return a matching HTMLElement (Node)', () => { const el = renderLitAsNode(html`
Link Some text: Hello, World
`); expect(el).to.be.instanceOf(HTMLElement); expect(el).dom.to.equal(`
Link Some text: Hello, World
`); }); it('should only render and return the first (root) node in the template', () => { const el = renderLitAsNode(html`
Link Some text: Hello, World
Sibling div
`); expect(el).dom.to.equal(`
Link Some text: Hello, World
`); }); });