Commit e1c1930
authored
Salesforce Marketing Cloud: Unit tests for V2 functionality (#3600)
* Add comprehensive unit tests for SFMC V2 actions
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 <[email protected]>
* fixes build1 parent ee5d565 commit e1c1930
2 files changed
Lines changed: 1328 additions & 0 deletions
File tree
- packages/destination-actions/src/destinations/salesforce-marketing-cloud/_tests_
0 commit comments