Is there a way to write unit tests for Sentry in Flutter?
I have a function that takes in a set of inputs and reports to Sentry
reportError({...}){
Sentry.captureException(stackTrace, stackTrace: stackTrace, hint: hint);
}
And I want to write a unit test for the same
test('sends to sentry', () {
reportError(
hint: 'error',
response: Response(
json.encode(<String, dynamic>{'message': '4: error'}),
401,
),
);
});
The question is, how do I verify that the error was logged?