From ef20c337256c6b4964061a13f0276c8048bc524f Mon Sep 17 00:00:00 2001 From: Bryan Oltman Date: Fri, 20 Oct 2023 12:36:31 -0400 Subject: [PATCH] chore(shorebird_code_push): remove error log when shorebird is unavailable (#101) * chore(shorebird_code_push): remove error log when shorebird is unavailable * fix tests --- .../lib/src/shorebird_code_push_io.dart | 2 -- .../test/shorebird_code_push_io_test.dart | 20 ++++++++----------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/shorebird_code_push/lib/src/shorebird_code_push_io.dart b/shorebird_code_push/lib/src/shorebird_code_push_io.dart index 2b6e888..449ec54 100644 --- a/shorebird_code_push/lib/src/shorebird_code_push_io.dart +++ b/shorebird_code_push/lib/src/shorebird_code_push_io.dart @@ -25,8 +25,6 @@ class ShorebirdCodePush implements ShorebirdCodePushBase { updater.currentPatchNumber(); _delegate = ShorebirdCodePushFfi(updater: updater); } catch (error) { - // ignore: avoid_print - print('[ShorebirdCodePush]: Error initializing updater: $error'); _delegate = ShorebirdCodePushNoop(); } } diff --git a/shorebird_code_push/test/shorebird_code_push_io_test.dart b/shorebird_code_push/test/shorebird_code_push_io_test.dart index abbc145..e77cb36 100644 --- a/shorebird_code_push/test/shorebird_code_push_io_test.dart +++ b/shorebird_code_push/test/shorebird_code_push_io_test.dart @@ -35,14 +35,11 @@ void main() { expect(shorebirdCodePush, isNotNull); expect( printLogs, - [ - startsWith( - '''[ShorebirdCodePush]: Error initializing updater: Invalid argument(s): Failed to lookup symbol''', - ), - equals( + equals( + [ '''[ShorebirdCodePush]: Shorebird Engine not available, using no-op implementation.\n''', - ), - ], + ], + ), ); }); @@ -58,12 +55,11 @@ void main() { ); expect( printLogs, - [ - equals('[ShorebirdCodePush]: Error initializing updater: $exception'), - equals( + equals( + [ '''[ShorebirdCodePush]: Shorebird Engine not available, using no-op implementation.\n''', - ), - ], + ], + ), ); });