Skip to content

Commit 3b8d068

Browse files
committed
Fix test
1 parent 580e5c5 commit 3b8d068

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/flutter/example/integration_test/integration_test.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -835,10 +835,12 @@ void main() {
835835

836836
var contexts = await SentryFlutter.native?.loadContexts();
837837

838-
final extras = Platform.isIOS ? contexts!['extra'] : contexts!['extras'];
838+
final extras = (Platform.isIOS || Platform.isMacOS)
839+
? contexts!['extra']
840+
: contexts!['extras'];
839841
expect(extras, isNotNull, reason: 'Extras are null');
840842

841-
if (Platform.isIOS) {
843+
if (Platform.isIOS || Platform.isMacOS) {
842844
expect(extras['key1'], 'randomValue', reason: 'key1 mismatch');
843845
expect(extras['key2'],
844846
{'String': 'Value', 'Bool': 1, 'Int': 123, 'Double': 12.3},
@@ -867,7 +869,8 @@ void main() {
867869
});
868870

869871
contexts = await SentryFlutter.native?.loadContexts();
870-
expect(contexts!['extra'], isNull, reason: 'Extra are not null');
872+
final extraKey = (Platform.isIOS || Platform.isMacOS) ? 'extra' : 'extras';
873+
expect(contexts![extraKey], isNull, reason: 'Extra are not null');
871874
});
872875

873876
group('e2e', () {

0 commit comments

Comments
 (0)