From 03d478851415ca739e567dab7a7b3eac43fd28e9 Mon Sep 17 00:00:00 2001 From: Ayo Date: Sun, 25 Jan 2026 19:29:37 +0100 Subject: [PATCH] test: add WebComponent test --- test/WebComponent.test.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/WebComponent.test.mjs b/test/WebComponent.test.mjs index 5effb3d..f8d972f 100644 --- a/test/WebComponent.test.mjs +++ b/test/WebComponent.test.mjs @@ -4,7 +4,11 @@ import { WebComponent } from '../src/WebComponent.js' let componentUnderTest describe('WebComponent', () => { - // Browsers throw an error when you instantiate a custom element class not in the registry + /** + * We need to define the custom element because + * browsers throw an error when you instantiate + * a custom element class that is not in the registry + */ window.customElements.define('component-test', WebComponent) beforeEach(() => {