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
This commit is contained in:
Bryan Oltman
2023-10-20 12:36:31 -04:00
committed by GitHub
parent 3b4b6ebc24
commit ef20c33725
2 changed files with 8 additions and 14 deletions
@@ -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();
}
}
@@ -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''',
),
],
],
),
);
});