Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add a isWeb param to sentry_flutter_test
  • Loading branch information
rxlabz committed Nov 24, 2020
commit 533b45796dc834a372a95bf5adee13a45b14c9b9
4 changes: 2 additions & 2 deletions flutter/test/sentry_flutter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void main() {

test('Flutter init for mobile will run default configurations', () async {
await SentryFlutter.init(
getConfigurationTester(false),
getConfigurationTester(),
callback,
packageLoader: loadTestPackage,
iOSPlatformChecker: () => false,
Expand All @@ -34,7 +34,7 @@ void main() {
test('Flutter init for mobile will run default configurations on ios',
() async {
await SentryFlutter.init(
getConfigurationTester(true),
getConfigurationTester(isIOS: true),
callback,
packageLoader: loadTestPackage,
iOSPlatformChecker: () => true,
Expand Down
7 changes: 5 additions & 2 deletions flutter/test/sentry_flutter_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ import 'package:sentry_flutter/src/version.dart';

import 'mocks.dart';

FutureOr<void> Function(SentryOptions) getConfigurationTester(bool onIOS) =>
FutureOr<void> Function(SentryOptions) getConfigurationTester({
bool isIOS = false,
bool isWeb = false,
}) =>
(SentryOptions options) async {
options.dsn = fakeDsn;

Expand All @@ -28,7 +31,7 @@ FutureOr<void> Function(SentryOptions) getConfigurationTester(bool onIOS) =>
.where((element) => element == isolateErrorIntegration),
isNotEmpty);

if (onIOS) {
if (isIOS) {
expect(5, options.integrations.length);
} else {
expect(4, options.integrations.length);
Expand Down