Salesforce Marketing Cloud: Unit tests for V2 functionality#3600
Salesforce Marketing Cloud: Unit tests for V2 functionality#3600
Conversation
Add complete test coverage for dataExtensionV2 and contactDataExtensionV2 actions, which previously had zero test coverage. These V2 actions use hooks for data extension configuration and dynamic field resolution. Test coverage includes: - perform() and performBatch() methods for both actions - Hook integration (onMappingSave and retlOnMappingSave) - Error handling (400, 500, missing config, retryable errors) - Dynamic field resolution (primary/non-primary key filtering) - Multistatus response handling - Default contactKey mapping from userId Tests follow patterns from asyncDataExtension.test.ts and validate the upsertRowsV2() and executeUpsertWithMultiStatus() functions. Total: 35 passing tests (18 for dataExtensionV2, 17 for contactDataExtensionV2) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New required fields detectedWarning Your PR adds new required fields to an existing destination. Adding new required settings/mappings for a destination already in production requires updating existing customer destination configuration. Ignore this warning if this PR is for a new destination with no active customers in production. The following required fields were added in this PR:
Add these new fields as optional instead and assume default values in |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3600 +/- ##
==========================================
+ Coverage 80.25% 80.42% +0.17%
==========================================
Files 1276 1283 +7
Lines 23485 23567 +82
Branches 4692 4726 +34
==========================================
+ Hits 18848 18954 +106
+ Misses 3762 3730 -32
- Partials 875 883 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This is wrong - Only .test.ts files have been updated here so this is impossible |
itsarijitray
left a comment
There was a problem hiding this comment.
Approving this as these are only test changes 🚀
This PR adds unit tests for previously untested V2 functionality in this destination.
Testing
Include any additional information about the testing you have completed to
ensure your changes behave as expected. For a speedy review, please check
any of the tasks you completed below during your testing.
Security Review
Please ensure sensitive data is properly protected in your integration.
type: 'password'New Destination Checklist
verioning-info.tsfile. example