shish / shimmie2

An easy-to-install community image gallery (aka booru)
http://code.shishnet.org/shimmie2/
GNU General Public License v2.0
413 stars 115 forks source link

JS Testing #1172

Open shish opened 5 months ago

shish commented 5 months ago

Shimmie isn't super-js-heavy in general, but a few extensions are (notes, autocomplete) - it'd be nice to have some tests for those

Seems like most JS testing frameworks assume you are using a full nodejs install, you can't just include the framework.js in your HTML headers. I can't even find a way to test a single .js file from the command line without a full node_modules / package.json / all that faff D:

A possible solution - have an extension which:

Maybe this is small enough that it could be DIY'ed? Define an assertEquals() function in ext/jstest/init.js, call it from ext/*/test.js, display results in ext/jstest/script.js?