diff options
| -rw-r--r-- | index.html | 2 | ||||
| -rw-r--r-- | main.mjs | 7 | ||||
| -rw-r--r-- | scale-tests.mjs | 2 | ||||
| -rw-r--r-- | test-harness.mjs | 6 | ||||
| -rw-r--r-- | tests.html | 2 |
5 files changed, 10 insertions, 9 deletions
@@ -98,7 +98,7 @@ <hr> - <a href='tests.html'>tests</a> + <a class='run' href='tests.html'>tests</a> <a href='https://git.spork.org/chords.git'>src</a> @@ -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) { @@ -7,8 +7,8 @@ <title>tests</title> </head> <body> + <a href='tests.html'>run</a> <x-test-harness> - <a href='tests.html'>run</a> <dl> <dt class='passed'>passed</dt> <dd class='passed-count'>0</dd> |
