diff options
| author | Brian Cully <bjc@spork.org> | 2025-07-28 10:06:33 -0400 |
|---|---|---|
| committer | Brian Cully <bjc@spork.org> | 2025-07-28 10:06:33 -0400 |
| commit | 400ddcde87ab1fae3249710b4a269a2cad86a128 (patch) | |
| tree | 8aba6d97d6eba4fe5b68ac7e191fb83d40d54284 /test-harness.mjs | |
| parent | 531f0b580fbf2b1f19fcc1ad0b29acfbe7606b36 (diff) | |
| download | chords-400ddcde87ab1fae3249710b4a269a2cad86a128.tar.gz chords-400ddcde87ab1fae3249710b4a269a2cad86a128.zip | |
start adding test infrastructure
lets make the link public, too, just for fun.
Diffstat (limited to 'test-harness.mjs')
| -rw-r--r-- | test-harness.mjs | 22 |
1 files changed, 22 insertions, 0 deletions
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); + }; + } +} |
