-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
[Feature Request] Add Unit Tests #125
Comments
Deno has built in test runner. |
With unit tests you mean a set of tests that use the discord api right? I think we could easily look at discordeno's implementation and use that as a reference point |
Yes, using the Discord API itself. It won't be hard to come up with our own implementation. |
It won't be hard no. But it's handy to have a reference point. We shouldn't be leaking resources or ops like dd does tho. |
This is not possible for Discord bots unit testing. We can't reopen connection for each test, that's just a very easy to hit rate limits... |
If you create the resource before the tests and not close it in the test then it works normally. It will only show a "leak" when you close it in the test |
Why not run the tests with github actions, and pass resources as a secret, and then a command line argument? Then load all the tests into a runner which is ran with Or is this just not viable? Or is this not what you mean? |
Resources are the things in the resource table. Not tokens etc. Stuff that is in |
This is certainly possible. When trying to fix op + resource leaks in dd I found that their code only leaked them. Not the test code. So it's doable by alot |
As this will be taken care of in v3, should this issue be closed? (can be tracked in #225 instead) |
All new functions would need their own tests. So maybe add a comment to #225 and say that all functions require a test etc. |
What do you want to request?
Adding unit tests
Do you have anything to tell us about your request?
Currently, harmony doesn't have any unit tests, which can make tests so much better and reliable.
The text was updated successfully, but these errors were encountered: