@augment-vir/test
Version:
A universal testing suite that works with Mocha style test runners _and_ Node.js's built-in test runner.
9 lines (8 loc) • 317 B
JavaScript
import { html } from 'element-vir';
export async function renderElement(elementDefinition, ...args) {
const { fixture } = await import('@open-wc/testing-helpers');
const instance = await fixture(html `
<${elementDefinition.assign(args[0] || {})}></${elementDefinition}>
`);
return instance;
}