summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.html2
-rw-r--r--main.mjs7
-rw-r--r--scale-tests.mjs2
-rw-r--r--test-harness.mjs6
-rw-r--r--tests.html2
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 @@
<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>
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 @@
<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>