Skip to content

Checks in some tests are broken #1122

Closed
@vaind

Description

@vaind

I've noticed while working on recent PRs that test code sometimes uses expect() and other types of assertions in callbacks to Sentry. E.g. Sentry.init() - these are broken and are actually not being checked at all because Sentry swallows these errors (doesn't propagate them). Minimal repro - the following test passes:

  test('should fail', () async {
    await Sentry.init((options) {
      fail('hello there');
    }, options: SentryOptions(dsn: fakeDsn));
  });

Besides a testing issue, this may also be a design problem - naively, as a User, I'd expect exceptions in user-provided code to be propagated.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions