Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
buenaflor committed Dec 22, 2023
1 parent 6784f06 commit 4ee46f7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dart/test/sentry_client_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import 'package:sentry/src/sentry_item_type.dart';
import 'package:sentry/src/sentry_stack_trace_factory.dart';
import 'package:sentry/src/sentry_tracer.dart';
import 'package:sentry/src/transport/data_category.dart';
import 'package:sentry/src/transport/spotlight_http_transport.dart';
import 'package:test/test.dart';

import 'mocks.dart';
Expand Down Expand Up @@ -1706,6 +1707,13 @@ void main() {

expect(capturedEnvelope.header.dsn, fixture.options.dsn);
});

test('Spotlight enabled should set transport to SpotlightHttpTransport', () async {
fixture.options.spotlight = Spotlight(enabled: true);
fixture.getSut();

expect(fixture.options.transport is SpotlightHttpTransport, true);
});
});
}

Expand Down
6 changes: 6 additions & 0 deletions dart/test/sentry_options_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,10 @@ void main() {

expect(options.isTracingEnabled(), false);
});

test('Spotlight is disabled by default', () {
final options = SentryOptions(dsn: fakeDsn);

expect(options.spotlight.enabled, false);
});
}

0 comments on commit 4ee46f7

Please sign in to comment.