-
Notifications
You must be signed in to change notification settings - Fork 61
Automated QA: Unit tests with other mocked infrastructure dependencies like logger, database, etc #635
Comments
It would be good if someone hurries for this. I am not allowed. |
@ByteBallet The time limit for this bounty is on Fri, 25 Aug 2023 17:47:30 UTC |
I'll make an exception for tests. I think it will be fast to merge in because we don't need to really QA test it. |
Since we migrated log from mezmo to supabase, supabase test is enough, isn't it? |
Not sure what that means but sounds like @0xcodercrane territory |
I am looking forward to this. Following are some points that I consider for high-quality unit tests.
|
We've created an adapter for supabase so it's fine that have the unit tests for supabase adapter. no need for supabase-js itself |
What do you mean by |
Do you have any updates @ByteBallet? If you would like to release the bounty back to the DevPool, please comment |
Would it be okay to create another supbase db for testing? |
You are right. I see not-so-good wording used by me here. Basically, what I am trying to say is if a function or a class that is subject under test, is calling another function, do not mock that function. Developers try to achieve test in isolation. Here, they try to isolate function or class which is the subject under test. This results in heavy mocking. Test in isolation is for the "test" not the "subject under tests". But you can mock for one of 2 reasons:
|
Do you have any updates @ByteBallet? If you would like to release the bounty back to the DevPool, please comment |
Currently in progress. |
In case using supabase adapter, isn't the database affected? or should I just assume that the test is not done for production db? |
/stop |
You have been unassigned from the bounty @ByteBallet |
The database isn't affected. |
Originally posted by @web4er in #626 (comment)
The text was updated successfully, but these errors were encountered: