From ba2a92120c56a5989f4f97b2d1450667ec16ad5e Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 28 Jul 2025 10:50:12 -0400 Subject: make tests run button force refresh works in ff at least, and that's what i use --- index.html | 2 +- main.mjs | 7 +++++++ scale-tests.mjs | 2 +- test-harness.mjs | 6 ------ tests.html | 2 +- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 95569a9..a867248 100644 --- a/index.html +++ b/index.html @@ -98,7 +98,7 @@
- tests + tests src diff --git a/main.mjs b/main.mjs index 9aa4dd2..452620d 100644 --- a/main.mjs +++ b/main.mjs @@ -73,6 +73,13 @@ function init() { document.querySelectorAll(KeyPicker.name).forEach(kp => { kp.addEventListener(kp.noteEnterEvent, noteEnter); kp.addEventListener(kp.noteLeaveEvent, noteLeave); + }); + + document.querySelector('a.run').forEach(a => { + a.onclick = e => { + e.preventDefault(); + location.reload(true); + } }) } document.addEventListener('DOMContentLoaded', init); diff --git a/scale-tests.mjs b/scale-tests.mjs index 8f08bb8..a9a8565 100644 --- a/scale-tests.mjs +++ b/scale-tests.mjs @@ -1,4 +1,4 @@ export default function() { - console.debug('scale tests'); + console.debug('scale test'); console.assert(0 === 0, '0 test'); } diff --git a/test-harness.mjs b/test-harness.mjs index 6990ad0..ec25a03 100644 --- a/test-harness.mjs +++ b/test-harness.mjs @@ -17,12 +17,6 @@ export default class extends HTMLElement { const skippedCount = this.querySelector('.skipped-count'); [passedCount, failedCount, skippedCount].forEach(e => e.innerHTML = '0'); - - const runLink = this.querySelector('a'); - runLink.onclick = e => { - e.preventDefault(); - this.run(); - }; } addTests(fn) { diff --git a/tests.html b/tests.html index 4b81d32..3ec0621 100644 --- a/tests.html +++ b/tests.html @@ -7,8 +7,8 @@ tests + run - run
passed
0
-- cgit v1.3