Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
buenaflor committed Dec 10, 2024
1 parent 7aa48f9 commit 8e0d58d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions flutter/example/integration_test/integration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,11 @@ void main() {
final event = await fixture.poll(uri, authToken);
expect(event, isNotNull);

final sentEvent = fixture.sentEvent;
expect(sentEvent, isNotNull);
final sentEvents =
fixture.sentEvents.where((el) => el!.eventId == event!['id']);
expect(
sentEvents.length, 1); // one button click should only send one error
final sentEvent = sentEvents.first;

final tags = event!['tags'] as List<dynamic>;

Expand Down Expand Up @@ -225,10 +228,10 @@ void main() {
}

class Fixture {
SentryEvent? sentEvent;
List<SentryEvent?> sentEvents = [];

FutureOr<SentryEvent?> beforeSend(SentryEvent event, Hint hint) async {
sentEvent ??= event;
sentEvents.add(event);
return event;
}

Expand Down

0 comments on commit 8e0d58d

Please sign in to comment.