-
Notifications
You must be signed in to change notification settings - Fork 102
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
Fix unit testing #579
Comments
Hi @grunch, which could be the main tasks here? |
As an initial test issue, we should fix the structure and all tests on https://github.com/lnp2pBot/bot/blob/main/tests/bot_test.js |
Alright, I can take this task, the first thing it's to move the names of the test files to .spec |
Hi @danfercf1 I assigned it to you |
Hi @grunch , I need a clarification for this file https://github.com/lnp2pBot/bot/blob/main/tests/bot_test.js, I was wondering if it's an integration test, or what is the main purpose of this file?, I've realized that it's making a connection to the DB, but in an unit test that's need to be mocked and it's using the bot instance to run the tests also |
Yes please, we need to do unit testing, all things that are wrong needs to be fixed, like replacing the DB connection with mock as you said |
Since the bot started to work we create some tests but in some point tests stop working, we need to have them working again and start creating new ones.
The bot is getting bigger and now testing is essential, the goals of this issue is to fix the testing to make it work again and fix all tests we already have written, in the future we will create new issues to create new tests and have better testing coverage.
The text was updated successfully, but these errors were encountered: