internal library
Fixtures and mock clients the test suites of the Supabase client packages themselves run on.
These are published so that the packages of the supabase-flutter monorepo
can share them, and are not part of the supported API of this package:
they change or disappear whenever the internal suites stop needing them.
Everything an app test needs is in package:supabase_test/supabase_test.dart.
Classes
- FailingHttpClient
- A mock HTTP client that answers every request with an empty body and the recognizable status code 420, so a test can assert this client was the one used.
- JsonResponseMockClient
- A mock HTTP client that answers every request with the same JSON body.
Constants
- sessionDataUserId → const String
- User id embedded in the session produced by getSessionData.
-
todoColumns
→ const List<
Map< String, Object> > -
Column description of the
todosfixture table, as the realtime server reports it in apostgres_changesevent.
Functions
-
getSessionData(
DateTime expireDateTime, {String userId = sessionDataUserId}) → ({String accessToken, String sessionString}) -
Constructs session data for a given expiration date, belonging to
userId. -
stallUntilAborted(
BaseRequest request) → Future< StreamedResponse> -
Never answers, so only completing
request's abort trigger, which surfaces as aRequestAbortedException, ends the request.