-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FED-1881 Fix regression in SyntheticEvent mock class type-checking #381
Conversation
Security InsightsNo security relevant content was detected by automated scans. Action Items
Questions or Comments? Reach out on Slack: #support-infosec. |
9a35e18
to
11e485e
Compare
} catch (_) {} | ||
|
||
return type != null && types.any(type.contains); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference, the current implementation in master:
bool _checkEventType(List<String> types) => this != null && type != null && types.any((t) => type.contains(t)); |
QA+1 CI passes with updated/new tests that cover the functionality |
@Workiva/release-management-p |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 from RM
Motivation
When testing these changes, we ran into a case where a consumer was mocking
type
, and relying on type-checking utilities to respect that.Previously, this would print
true
, but in v7_wip, it printsfalse
.Solution
Testing
Synthetic event helpers SyntheticEventTypeHelpers checks types correctly for Mock objects with
typemocked