From d95d3ea8bdaa690565de2aa441f23b30c8f9a97c Mon Sep 17 00:00:00 2001 From: Tim Shedor Date: Mon, 16 Dec 2024 12:46:43 -0800 Subject: [PATCH] fix test --- .../lib/src/offline_first_exception.dart | 1 + .../test_offline_first_where.dart | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/brick_offline_first/lib/src/offline_first_exception.dart b/packages/brick_offline_first/lib/src/offline_first_exception.dart index d1cbc79a..d4b184e0 100644 --- a/packages/brick_offline_first/lib/src/offline_first_exception.dart +++ b/packages/brick_offline_first/lib/src/offline_first_exception.dart @@ -12,6 +12,7 @@ class OfflineFirstException implements Exception { /// is not important to the requested behavior. OfflineFirstException(this.originalError); + /// String get message => originalError.toString(); @override diff --git a/packages/brick_offline_first_with_supabase_build/test/offline_first_generator/test_offline_first_where.dart b/packages/brick_offline_first_with_supabase_build/test/offline_first_generator/test_offline_first_where.dart index a712e746..958e8f23 100644 --- a/packages/brick_offline_first_with_supabase_build/test/offline_first_generator/test_offline_first_where.dart +++ b/packages/brick_offline_first_with_supabase_build/test/offline_first_generator/test_offline_first_where.dart @@ -11,19 +11,20 @@ Future _$SupabaseOfflineFirstWhereFromSupabase( {required SupabaseProvider provider, OfflineFirstRepository? repository}) async { return SupabaseOfflineFirstWhere( - association: await repository! - .getAssociation(Query( - where: [Where.exact('id', data["association"]["id"])], - providerArgs: {'limit': 1})) - .then((r) => r!.first), + association: + await repository!.getAssociation(Query(where: [Where.exact('id', data["association"]["id"])], limit: 1)).then( + (r) => r!.first), associations: await Future.wait(data['associations'] ?.map((d) => AssocAdapter() .fromSupabase(d, provider: provider, repository: repository)) .toList() .cast>() ?? []), - nullableAssociations: await Future.wait( - data['nullable_associations']?.map((d) => AssocAdapter().fromSupabase(d, provider: provider, repository: repository)).toList().cast>() ?? [])); + nullableAssociations: await Future.wait(data['nullable_associations'] + ?.map((d) => AssocAdapter().fromSupabase(d, provider: provider, repository: repository)) + .toList() + .cast>() ?? + [])); } Future> _$SupabaseOfflineFirstWhereToSupabase(