Skip to content

Commit b3e344f

Browse files
fix(rokt-capi): repair interleaved test blocks broken by merge conflict resolution (#3887)
PR #3808 merged a bad merge-conflict resolution that spliced two rokt-capi 'send' tests together: 'should not send empty or whitespace-only strings as hashed values' lost its .reply()/testAction()/closing, and its mapping fields were mashed into the following test's mapping (missing comma after `ip: ' '`), producing a TS1005 syntax error that fails compilation and the test suite on main. De-interleave the two tests into separate, complete `it` blocks. All 23 rokt-capi tests pass. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b2fcd60 commit b3e344f

1 file changed

Lines changed: 35 additions & 22 deletions

File tree

  • packages/destination-actions/src/destinations/rokt-capi/send/__tests__

packages/destination-actions/src/destinations/rokt-capi/send/__tests__/index.test.ts

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,41 @@ describe('RoktCapi.send', () => {
645645
expect(body.ip).toBeUndefined()
646646
return true
647647
})
648+
.reply(200, { success: true })
649+
650+
const responses = await testDestination.testAction('send', {
651+
event,
652+
useDefaultMappings: true,
653+
mapping: {
654+
hashingConfiguration: {
655+
hashEmail: true,
656+
hashFirstName: true,
657+
hashLastName: true,
658+
hashMobile: true,
659+
hashBillingZipcode: true
660+
},
661+
user_identities: {
662+
email: ' ',
663+
customerid: 'user-ws'
664+
},
665+
user_attributes: {
666+
firstname: '',
667+
lastname: ' ',
668+
mobile: ' ',
669+
billingzipcode: ''
670+
},
671+
device_info: {
672+
http_header_user_agent: ' ',
673+
ios_advertising_id: ''
674+
},
675+
ip: ' '
676+
}
677+
})
678+
679+
expect(responses.length).toBe(1)
680+
expect(responses[0].status).toBe(200)
681+
})
682+
648683
it('should use distinct source_message_ids when a conversion and an audience event are sent together', async () => {
649684
const event = createTestEvent({
650685
event: 'Order Completed',
@@ -712,28 +747,6 @@ describe('RoktCapi.send', () => {
712747
event,
713748
useDefaultMappings: true,
714749
mapping: {
715-
hashingConfiguration: {
716-
hashEmail: true,
717-
hashFirstName: true,
718-
hashLastName: true,
719-
hashMobile: true,
720-
hashBillingZipcode: true
721-
},
722-
user_identities: {
723-
email: ' ',
724-
customerid: 'user-ws'
725-
},
726-
user_attributes: {
727-
firstname: '',
728-
lastname: ' ',
729-
mobile: ' ',
730-
billingzipcode: ''
731-
},
732-
device_info: {
733-
http_header_user_agent: ' ',
734-
ios_advertising_id: ''
735-
},
736-
ip: ' '
737750
eventDetails: {
738751
conversiontype: 'Order Completed',
739752
source_message_id: 'msg-combined',

0 commit comments

Comments
 (0)