Skip to content
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

Add global mutation trigger field to EntityCompanionProvider #215

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Josh-McFarlin
Copy link
Contributor

Why

Adding global mutation triggers to EntityCompanionProvider allows the creation of mutation triggers that run for every entity.

How

I added the property globalMutationTriggers to EntityCompanionProvider. In the EntityMutator constructor, the mutationTriggers property is set to the combination of companionProvider.globalMutationTriggers and any mutation triggers included in the constructor's parameter. Global mutation triggers will always run before any mutation triggers defined for the individual entity.

Test Plan

I modified EntityMutator-test.ts to include the globalMutationTriggers during createEntityMutatorFactory, and these global triggers have their trigger count verified later.

Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (659e083) 95.46% compared to head (f2c48bf) 95.49%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #215      +/-   ##
==========================================
+ Coverage   95.46%   95.49%   +0.02%     
==========================================
  Files          79       79              
  Lines        2075     2087      +12     
  Branches      258      264       +6     
==========================================
+ Hits         1981     1993      +12     
  Misses         93       93              
  Partials        1        1              
Flag Coverage Δ
integration 95.49% <100.00%> (+0.02%) ⬆️
unittest 95.49% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant