Open tomasAlabes opened 8 months ago
We just published a package to mock a SupabaseClient instance. We would love to hear what you think about it! https://pub.dev/packages/mock_supabase_http_client
We just published a package to mock a SupabaseClient instance. We would love to hear what you think about it! https://pub.dev/packages/mock_supabase_http_client
hey @dshukertjr thanks for this. is there any ETA to test .count() and a way to throw errors?
cheers,
@cmoscosoz Glad to hear you like it! There aren't any ETAs, but if you need it, let me add it over the weekend!
a way to throw errors?
For this, what type of feature were you looking for?
@cmoscosoz Glad to hear you like it! There aren't any ETAs, but if you need it, let me add it over the weekend!
a way to throw errors?
For this, what type of feature were you looking for?
thank you! , i.e: timeouts, or better example something similar like when using when().throw() with mockito 😄
@cmoscosoz I just released v0.0.3 of mock_supabase_http_client, which includes support for count! Let me know if you run into any issues. Also, let me know if you have any additional features that you want it to support.
Let me think about how I can add support for errors 👍
@dshukertjr I would like to test aggregate functions, rpc functions and errors :)
@cmoscosoz I just released v0.0.3 of mock_supabase_http_client, which includes support for count! Let me know if you run into any issues. Also, let me know if you have any additional features that you want it to support.
Let me think about how I can add support for errors 👍
@dshukertjr awesome thanks! I just created a PR adding support to datetime value types.
cheers!
@ngoc-quoc-huynh Thanks for the suggestion! Will try to add support for them 👍 Keep those feature requests coming if you have more!
@cmoscosoz Thanks for the awesome fix!
To keep #109 alive, related to #36, https://github.com/supabase/supabase-dart/issues/12.
Any serious project needs unit testing around components using Supabase. In my particular case, I have a provider that fetches data with Supabase Postgrest client, I haven't been able to mock the calls to return mock data.
Some references I've seen, but nothing really works:
An example code to be tested:
I know there are ways to work around this, but I'm looking for a blessed and official way from the Supabase team.