feat: add a longer no-op message. (#218)

This is a common source of confusion, hopefully this will help.
This commit is contained in:
Eric Seidel
2024-10-04 12:08:41 -07:00
committed by GitHub
parent 8dd189a739
commit 3ad4166f23
3 changed files with 16 additions and 3 deletions
@@ -11,6 +11,9 @@ class ShorebirdCodePushNoop implements ShorebirdCodePushBase {
// ignore: avoid_print
print('''
[ShorebirdCodePush]: Shorebird Engine not available, using no-op implementation.
This occurs when using package:shorebird_code_push in an app that does not
contain the Shorebird Engine. Most commonly this is due to building with
`flutter build` or `flutter run` instead of `shorebird release`.
''');
}
@override
@@ -37,7 +37,11 @@ void main() {
printLogs,
equals(
[
'''[ShorebirdCodePush]: Shorebird Engine not available, using no-op implementation.\n''',
'''
[ShorebirdCodePush]: Shorebird Engine not available, using no-op implementation.
This occurs when using package:shorebird_code_push in an app that does not
contain the Shorebird Engine. Most commonly this is due to building with
`flutter build` or `flutter run` instead of `shorebird release`.\n''',
],
),
);
@@ -57,7 +61,11 @@ void main() {
printLogs,
equals(
[
'''[ShorebirdCodePush]: Shorebird Engine not available, using no-op implementation.\n''',
'''
[ShorebirdCodePush]: Shorebird Engine not available, using no-op implementation.
This occurs when using package:shorebird_code_push in an app that does not
contain the Shorebird Engine. Most commonly this is due to building with
`flutter build` or `flutter run` instead of `shorebird release`.\n''',
],
),
);
@@ -23,7 +23,9 @@ void main() {
test('logs warning when instantiated', () {
const expected = '''
[ShorebirdCodePush]: Shorebird Engine not available, using no-op implementation.
''';
This occurs when using package:shorebird_code_push in an app that does not
contain the Shorebird Engine. Most commonly this is due to building with
`flutter build` or `flutter run` instead of `shorebird release`.\n''';
expect(printLogs, equals([expected]));
});