@@ -95,6 +95,7 @@ jest.mock('../../primitives/index.js', () => {
9595} )
9696
9797let walletMock : Partial < WalletInterface >
98+ const TEST_ORIGINATOR = 'test.originator.example'
9899
99100/**
100101 * Build minimal valid DefinitionData for each type
@@ -163,7 +164,7 @@ describe('RegistryClient', () => {
163164 getNetwork : jest . fn ( ) . mockResolvedValue ( { network : 'main' } )
164165 }
165166
166- registryClient = new RegistryClient ( walletMock as WalletInterface )
167+ registryClient = new RegistryClient ( walletMock as WalletInterface , { } , TEST_ORIGINATOR )
167168
168169 // Mock the resolver instance since it's now initialized in constructor
169170 ; ( registryClient as any ) . resolver = {
@@ -195,7 +196,8 @@ describe('RegistryClient', () => {
195196 lockingScript : 'mockLockingScriptHex'
196197 } )
197198 ] )
198- } )
199+ } ) ,
200+ TEST_ORIGINATOR
199201 )
200202 expect ( TopicBroadcaster ) . toHaveBeenCalledWith ( [ 'tm_basketmap' ] , expect . objectContaining ( {
201203 networkPreset : 'main'
@@ -219,7 +221,8 @@ describe('RegistryClient', () => {
219221 lockingScript : 'mockLockingScriptHex'
220222 } )
221223 ] )
222- } )
224+ } ) ,
225+ TEST_ORIGINATOR
223226 )
224227
225228 expect ( TopicBroadcaster ) . toHaveBeenCalledWith ( [ 'tm_protomap' ] , expect . objectContaining ( {
@@ -244,7 +247,8 @@ describe('RegistryClient', () => {
244247 lockingScript : 'mockLockingScriptHex'
245248 } )
246249 ] )
247- } )
250+ } ) ,
251+ TEST_ORIGINATOR
248252 )
249253
250254 expect ( TopicBroadcaster ) . toHaveBeenCalledWith ( [ 'tm_certmap' ] , expect . objectContaining ( {
@@ -445,7 +449,8 @@ describe('RegistryClient', () => {
445449 inputDescription : 'Removing basket token'
446450 }
447451 ]
448- } )
452+ } ) ,
453+ TEST_ORIGINATOR
449454 )
450455
451456 expect ( TopicBroadcaster ) . toHaveBeenCalledWith ( [ 'tm_basketmap' ] , expect . objectContaining ( {
@@ -535,7 +540,8 @@ describe('RegistryClient', () => {
535540 inputDescription : 'Removing protocol token'
536541 }
537542 ]
538- } )
543+ } ) ,
544+ TEST_ORIGINATOR
539545 )
540546
541547 expect ( TopicBroadcaster ) . toHaveBeenCalledWith ( [ 'tm_protomap' ] , expect . objectContaining ( {
@@ -573,7 +579,8 @@ describe('RegistryClient', () => {
573579 inputDescription : 'Removing certificate token'
574580 }
575581 ]
576- } )
582+ } ) ,
583+ TEST_ORIGINATOR
577584 )
578585
579586 expect ( TopicBroadcaster ) . toHaveBeenCalledWith ( [ 'tm_certmap' ] , expect . objectContaining ( {
@@ -604,13 +611,14 @@ describe('RegistryClient', () => {
604611 expect ( walletMock . createAction ) . toHaveBeenCalledWith (
605612 expect . objectContaining ( {
606613 description : 'Remove certificate item: testCertType'
607- } )
614+ } ) ,
615+ TEST_ORIGINATOR
608616 )
609617 } )
610618
611619 it ( 'should use acceptDelayedBroadcast setting from constructor' , async ( ) => {
612620 // Create a new client with acceptDelayedBroadcast: true
613- const clientWithDelayedBroadcast = new RegistryClient ( walletMock as WalletInterface , { acceptDelayedBroadcast : true } )
621+ const clientWithDelayedBroadcast = new RegistryClient ( walletMock as WalletInterface , { acceptDelayedBroadcast : true } , TEST_ORIGINATOR )
614622 ; ( clientWithDelayedBroadcast as any ) . resolver = {
615623 query : jest . fn ( ) . mockResolvedValue ( { type : 'output-list' , outputs : [ ] } )
616624 }
@@ -622,15 +630,17 @@ describe('RegistryClient', () => {
622630 options : expect . objectContaining ( {
623631 acceptDelayedBroadcast : true
624632 } )
625- } )
633+ } ) ,
634+ TEST_ORIGINATOR
626635 )
627636
628637 expect ( walletMock . signAction ) . toHaveBeenCalledWith (
629638 expect . objectContaining ( {
630639 options : expect . objectContaining ( {
631640 acceptDelayedBroadcast : true
632641 } )
633- } )
642+ } ) ,
643+ TEST_ORIGINATOR
634644 )
635645 } )
636646 } )
0 commit comments