geekr icon indicating copy to clipboard operation
geekr copied to clipboard

Provide automated tests

Open jarvis394 opened this issue 3 years ago • 6 comments

Autotesting is the key in open-sourced project, people can not worry about if their pull request will break the app or not. They will already know the answer.

jarvis394 avatar Nov 02 '20 20:11 jarvis394

In first time I recommend this simple way: react-testing-library

Luchanso avatar Nov 02 '20 22:11 Luchanso

Well, I can provide some help, but before issue should be split in test types: ui, api, etc. Also, we need determ where test files should be located: near test subject or tests should have their own directrory

NeiruBugz avatar Aug 30 '21 08:08 NeiruBugz

Contact me via Telegram if you want to discuss issue. Or an email.

NeiruBugz avatar Aug 30 '21 11:08 NeiruBugz

Well, I can provide some help, but before issue should be split in test types: ui, api, etc.

There should be only one test category - the React code. We don't need to test API because it is external and UI is tested on multiple devices, so I always know if the layout is wrong before publishing a version.

Also, we need determ where test files should be located: near test subject or tests should have their own directrory

I prefer having a separate tests/ folder and have the same structure, as files in the main src/ folder.

I want to test some obvious issues, like props to some components (this issue could've been covered by tests https://github.com/jarvis394/habra/issues/121). But, anyways, writing tests is always a tedious job and such small project doesn't even need them because I have Sentry collecting errors. Every day I just check logs and, if I have an error, I fix it.

jarvis394 avatar Aug 30 '21 14:08 jarvis394

So, looks like you don't need tests. Fine, I'll find another issue. Pretty impressed by the app and really wanna help and contribute

NeiruBugz avatar Aug 30 '21 14:08 NeiruBugz

yup, thanks in advance!

jarvis394 avatar Aug 30 '21 15:08 jarvis394