Skip to content

Commit 4ee46f7

Browse files
committed
add tests
1 parent 6784f06 commit 4ee46f7

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

dart/test/sentry_client_test.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import 'package:sentry/src/sentry_item_type.dart';
1212
import 'package:sentry/src/sentry_stack_trace_factory.dart';
1313
import 'package:sentry/src/sentry_tracer.dart';
1414
import 'package:sentry/src/transport/data_category.dart';
15+
import 'package:sentry/src/transport/spotlight_http_transport.dart';
1516
import 'package:test/test.dart';
1617

1718
import 'mocks.dart';
@@ -1706,6 +1707,13 @@ void main() {
17061707

17071708
expect(capturedEnvelope.header.dsn, fixture.options.dsn);
17081709
});
1710+
1711+
test('Spotlight enabled should set transport to SpotlightHttpTransport', () async {
1712+
fixture.options.spotlight = Spotlight(enabled: true);
1713+
fixture.getSut();
1714+
1715+
expect(fixture.options.transport is SpotlightHttpTransport, true);
1716+
});
17091717
});
17101718
}
17111719

dart/test/sentry_options_test.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,10 @@ void main() {
127127

128128
expect(options.isTracingEnabled(), false);
129129
});
130+
131+
test('Spotlight is disabled by default', () {
132+
final options = SentryOptions(dsn: fakeDsn);
133+
134+
expect(options.spotlight.enabled, false);
135+
});
130136
}

0 commit comments

Comments
 (0)