Supabase는 Flutter 애플리케이션에 Supabase의 백엔드 서비스를 쉽게 통합할 수 있도록 해주는 Dart 클라이언트입니다. 최소한의 설정으로 데이터베이스, 인증, 파일 저장소 등에 보안되고 실시간으로 접근할 수 있습니다. Android, iOS, Web, macOS, Windows, Linux 등 여러 플랫폼을 지원하여 크로스플랫폼 앱 개발에 적합합니다. 내장된 JWT 인증 및 행 수준 보안 지원을 통해 개발자는 빠르게 확장 가능하고 안전한 애플리케이션을 구축할 수 있습니다.
The helpers the test suites of these packages run on are published in
package:supabase_test,
so your tests can build on the same primitives: mock HTTP clients, JWT builders,
auth session fixtures and realtime frames. Add the package as a dev dependency:
dev_dependencies:supabase_test:^0.1.0
Then stub the endpoints the code under test talks to and run it against a
real SupabaseClient, with no running stack required:
final httpClient = MockSupabaseHttpClient()
..stubTable('todos', rows: [
{'id': 1, 'task': 'Ship it', 'status': false},
]);
final supabase = testSupabaseClient(httpClient: httpClient);
addTearDown(supabase.dispose);
final todos = await supabase.from('todos').select();
expect(todos, hasLength(1));
See the supabase_test README for the
full guide: stubbing database, rpc, edge function and auth endpoints,
asserting on recorded requests, running tests as a signed-in user, and wiring
Supabase.initialize in Flutter widget tests.
Testing this repo
The tests for the packages postgrest, supabase_auth, supabase_realtime and supabase_storage run against a
local Supabase stack. To run these tests locally you need docker and the
Supabase CLI installed.
The single configuration for the stack lives in the supabase directory at the repository root.
Start it with:
supabase start
Run the Dart tests within the package directory in packages/<package> with the following command.
The -j 1 flag runs the tests not concurrently, which works better since the tests run against the
same services.
dart test -j 1
To stop the stack run the following command from the repository root: