Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS Testing #1172

Open
shish opened this issue Jun 7, 2024 · 0 comments
Open

JS Testing #1172

shish opened this issue Jun 7, 2024 · 0 comments
Labels

Comments

@shish
Copy link
Owner

shish commented Jun 7, 2024

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:

  • includes ext/*/test.js into the page headers
  • includes a small testing framework which calls whichever test suites were defined in test.js
  • displays results on the page

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?

@shish shish added the Feature label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant