jest tests for plugins
Helps get a general overview which plugins work and which do not.
However it is not completely consistent. For example:
- LightNovelPub:
- works in app
- doesn't work in web
- works partly in tests
- RanobeLib:
- doesn't install in app
- works in web
- doesn't work in tests
I tried to figure out why this is, but wasn't able to.
When we should run this script? Is it better than just waiting for user's report when some plugins not working
My initial intension was to have it automatically run and mark broken plugins as broken, but for some reason it isn't that reliable. Maybe if someone who knows more about plugins looks at it, it can become more reliable.
There are many plugins requires cookies to obtain data, even some requires authentication. Also because of different networking handler, some work in the app but not in the web.
We could exclude them, then we would at least had a few automted or just close the pr. The main reason i created it was because i wanted to work a bit with jest.
Imo unit tests is used for functionalities testing.
It should have test cases where plugin should pass (success or fail as expected).
And the test input data should be staticly prepared. Which means you just need to provide some random html files or json object via a local server (could be a proxy).
I think you are testing both plugin functionalities and availability.
But if you still want to test plugin availability, i recommend using some tools like selenium or puppeteer.
Yeah i agree, i will probably look into that again in the future, but currently i have not enough time for that.