feat: add a longer no-op message. (#218)
This is a common source of confusion, hopefully this will help.
This commit is contained in:
@@ -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]));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user