Skip to content

Commit

Permalink
format, update test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
denrase committed Sep 4, 2023
1 parent 98d58d5 commit ee4d4b2
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
24 changes: 12 additions & 12 deletions dio/test/dio_event_processor_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void main() {
throwable: throwable,
exceptions: [
fixture.sentryError(throwable),
fixture.sentryError(dioError)
fixture.sentryError(dioError),
],
);
final processedEvent = sut.apply(event) as SentryEvent;
Expand Down Expand Up @@ -96,7 +96,7 @@ void main() {
throwable: throwable,
exceptions: [
fixture.sentryError(throwable),
fixture.sentryError(dioError)
fixture.sentryError(dioError),
],
);
final processedEvent = sut.apply(event) as SentryEvent;
Expand Down Expand Up @@ -125,7 +125,7 @@ void main() {
throwable: throwable,
exceptions: [
fixture.sentryError(throwable),
fixture.sentryError(dioError)
fixture.sentryError(dioError),
],
);
final processedEvent = sut.apply(event) as SentryEvent;
Expand Down Expand Up @@ -177,7 +177,7 @@ void main() {
throwable: throwable,
exceptions: [
fixture.sentryError(throwable),
fixture.sentryError(dioError)
fixture.sentryError(dioError),
],
);
final processedEvent = sut.apply(event) as SentryEvent;
Expand Down Expand Up @@ -207,7 +207,7 @@ void main() {
data: 'foobar',
headers: Headers.fromMap(<String, List<String>>{
'foo': ['bar'],
'set-cookie': ['foo=bar']
'set-cookie': ['foo=bar'],
}),
requestOptions: request,
isRedirect: true,
Expand All @@ -219,7 +219,7 @@ void main() {
throwable: throwable,
exceptions: [
fixture.sentryError(throwable),
fixture.sentryError(dioError)
fixture.sentryError(dioError),
],
);
final processedEvent = sut.apply(event) as SentryEvent;
Expand Down Expand Up @@ -248,7 +248,7 @@ void main() {
response: Response<dynamic>(
data: 'foobar',
headers: Headers.fromMap(<String, List<String>>{
'foo': ['bar']
'foo': ['bar'],
}),
requestOptions: request,
isRedirect: true,
Expand All @@ -260,7 +260,7 @@ void main() {
throwable: throwable,
exceptions: [
fixture.sentryError(throwable),
fixture.sentryError(dioError)
fixture.sentryError(dioError),
],
);
final processedEvent = sut.apply(event) as SentryEvent;
Expand Down Expand Up @@ -320,7 +320,7 @@ void main() {
throwable: throwable,
exceptions: [
fixture.sentryError(throwable),
fixture.sentryError(dioError)
fixture.sentryError(dioError),
],
);
final processedEvent = sut.apply(event) as SentryEvent;
Expand All @@ -338,7 +338,7 @@ void main() {
final dataByType = {
ResponseType.plain: ['plain'],
ResponseType.bytes: [
[1337]
[1337],
],
ResponseType.json: [
9001,
Expand All @@ -347,7 +347,7 @@ void main() {
true,
['list'],
{'map-key': 'map-value'},
]
],
};

for (final entry in dataByType.entries) {
Expand Down Expand Up @@ -375,7 +375,7 @@ void main() {
throwable: throwable,
exceptions: [
fixture.sentryError(throwable),
fixture.sentryError(dioError)
fixture.sentryError(dioError),
],
);
final processedEvent = sut.apply(event) as SentryEvent;
Expand Down
2 changes: 1 addition & 1 deletion dio/test/failed_request_interceptor_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class Fixture {

FailedRequestInterceptor getSut({
List<SentryStatusCode> failedRequestStatusCodes = const [
SentryStatusCode.defaultRange()
SentryStatusCode.defaultRange(),
],
List<String> failedRequestTargets = const ['.*'],
}) {
Expand Down
2 changes: 1 addition & 1 deletion dio/test/mocks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ final fakeEvent = SentryEvent(
type: 'navigation',
data: <String, dynamic>{'screen': 'MainActivity', 'state': 'created'},
level: SentryLevel.info,
)
),
],
contexts: Contexts(
operatingSystem: const SentryOperatingSystem(
Expand Down
2 changes: 1 addition & 1 deletion flutter/lib/src/jvm/jvm_exception.dart
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class JvmException {
final thisExceptionFrames = thisException
.map((e) => JvmFrame.parse(e))
.where(
(e) => e.originalFrame.isNotEmpty && e.originalFrame.trim() != 'at' )
(e) => e.originalFrame.isNotEmpty && e.originalFrame.trim() != 'at')
.toList(growable: false);

final suppressedExceptions = supressed
Expand Down
7 changes: 3 additions & 4 deletions flutter/test/jvm/jvm_exception_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void main() {
'Violation of unique constraint MY_ENTITY_UK_1: duplicate value(s) for column(s) MY_COLUMN in statement [...]');
expect(thirdCause.thread, null);
expect(thirdCause.type, 'java.sql.SQLException');
expect(thirdCause.stackTrace.length, 6);
expect(thirdCause.stackTrace.length, 5);
expect(thirdCause.causes, null);
expect(thirdCause.suppressed, null);
});
Expand Down Expand Up @@ -87,8 +87,7 @@ void main() {
});

test('parse drops frames with `at ` and empty original frame', () {
final exception =
JvmException.parse(platformExceptionWithEmptyLastStackFrame);
final exception = JvmException.parse(platformExceptionWithEmptyStackFrames);
expect(exception.stackTrace.length, 13);
expect(exception.stackTrace.last.className,
'com.android.internal.os.ZygoteInit');
Expand Down Expand Up @@ -206,7 +205,7 @@ java.lang.IllegalArgumentException: Unsupported value: '[Ljava.lang.StackTraceEl
at com.android.internal.os.RuntimeInit\$MethodAndArgsCaller.run(RuntimeInit.java:556)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1037)''';

const platformExceptionWithEmptyLastStackFrame = '''
const platformExceptionWithEmptyStackFrames = '''
java.lang.RuntimeException: Catch this platform exception!
at io.sentry.samples.flutter.MainActivity\$configureFlutterEngine\$1.onMethodCall(MainActivity.kt:40)
at io.flutter.plugin.common.MethodChannel\$IncomingMethodCallHandler.onMessage(MethodChannel.java:258)
Expand Down
3 changes: 2 additions & 1 deletion sqflite/test/mocks/mocks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ ISentrySpan startTransactionShim(
DatabaseExecutor,
],
customMocks: [
MockSpec<Hub>(fallbackGenerators: {#startTransaction: startTransactionShim})
MockSpec<Hub>(
fallbackGenerators: {#startTransaction: startTransactionShim}),
],
)
void main() {}

0 comments on commit ee4d4b2

Please sign in to comment.