Selaa lähdekoodia

ref: move test page

Sven 1 vuosi sitten
vanhempi
commit
7c4cfa8581
5 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 2 0
      test/README.md
  2. 0 0
      test/TestPage/index.css
  3. 0 0
      test/TestPage/index.html
  4. 3 2
      test/TestPage/index.js
  5. 0 0
      test/TestPage/server.mts

+ 2 - 0
test/README.md

@@ -7,3 +7,5 @@
 6. Install deps with `npm i`
 7. Link with `npm link @sv443-network/userutils`
 8. Watch and recompile test userscript with `npm run dev` (or `npm run test-dev` when in the main project root)
+
+To quickly run everything in parallel, use these commands in the root UserUtils project: `npm test` and `npm run dev`

+ 0 - 0
test/index.css → test/TestPage/index.css


+ 0 - 0
test/index.html → test/TestPage/index.html


+ 3 - 2
test/index.js → test/TestPage/index.js

@@ -1,10 +1,10 @@
-function load() {
+function onLoad() {
   document
     .querySelector("#selector-observer-btn")
     .addEventListener("click", selectorObserver);
 }
 
-document.addEventListener("DOMContentLoaded", load);
+document.addEventListener("DOMContentLoaded", onLoad);
 
 //#SECTION SelectorObserver
 
@@ -53,6 +53,7 @@ async function addElements(contNum, container) {
 
 //#SECTION utils
 
+/** @param {number} ms */
 function sleep(ms) {
   return new Promise((resolve) => setTimeout(resolve, ms));
 }

+ 0 - 0
test/server.mts → test/TestPage/server.mts