From 400ddcde87ab1fae3249710b4a269a2cad86a128 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 28 Jul 2025 10:06:33 -0400 Subject: start adding test infrastructure lets make the link public, too, just for fun. --- test-harness.mjs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test-harness.mjs (limited to 'test-harness.mjs') diff --git a/test-harness.mjs b/test-harness.mjs new file mode 100644 index 0000000..3af026c --- /dev/null +++ b/test-harness.mjs @@ -0,0 +1,22 @@ +export default class extends HTMLElement { + static name = 'x-test-harness'; + static register() { + console.debug('Registering Element', this.name, this); + customElements.define(this.name, this); + } + + connectedCallback() { + console.debug('TestHarness#connectedCallback', this); + const passedCount = this.querySelector('.passed-count'); + const failedCount = this.querySelector('.failed-count'); + const skippedCount = this.querySelector('.skipped-count'); + + [passedCount, failedCount, skippedCount].forEach(e => e.innerHTML = '0'); + + const runLink = this.querySelector('a'); + runLink.onclick = e => { + e.preventDefault(); + console.debug('runlink clicked', e); + }; + } +} -- cgit v1.3