@@ -104,7 +104,7 @@ describe('localKVStore', () => {
104104 // const testUnlockingScriptHex = 'mockUnlockingScriptHex'; // Defined above
105105
106106 beforeEach ( ( ) => {
107- // Reset mocks before each test (clears calls and resets implementations)
107+ // Reset mocks before each test (clears calls and resets implementations)
108108 jest . clearAllMocks ( )
109109
110110 // Create a fresh mock wallet for each test
@@ -122,7 +122,7 @@ describe('localKVStore', () => {
122122 // --- Constructor Tests ---
123123 describe ( 'constructor' , ( ) => {
124124 it ( 'should create an instance with default wallet and encrypt=true' , ( ) => {
125- // We need to mock the default WalletClient if the SUT uses it
125+ // We need to mock the default WalletClient if the SUT uses it
126126 const MockedWalletClient = require ( '../../../mod.js' ) . WalletClient
127127 const store = new LocalKVStore ( undefined , 'default-context' )
128128 expect ( store ) . toBeInstanceOf ( LocalKVStore )
@@ -200,7 +200,7 @@ describe('localKVStore', () => {
200200 let pushDropInstance : PushDrop // To access the instance methods
201201
202202 beforeEach ( ( ) => {
203- // Get the mock instance that will be created by `new PushDrop()`
203+ // Get the mock instance that will be created by `new PushDrop()`
204204 pushDropInstance = new ( PushDrop as any ) ( )
205205 } )
206206
@@ -223,7 +223,7 @@ describe('localKVStore', () => {
223223 plaintext : valueArray , // Should be Array<number>
224224 protocolID : [ 2 , testContext ] ,
225225 keyID : testKey
226- } )
226+ } , undefined )
227227 // Check the mock instance's lock method
228228 expect ( mockPDInstance . lock ) . toHaveBeenCalledWith (
229229 // The lock function expects Array<number[] | Uint8Array>
@@ -250,7 +250,7 @@ describe('localKVStore', () => {
250250 acceptDelayedBroadcast : false ,
251251 randomizeOutputs : false
252252 }
253- } )
253+ } , undefined )
254254 expect ( mockWallet . signAction ) . not . toHaveBeenCalled ( )
255255 expect ( mockWallet . relinquishOutput ) . not . toHaveBeenCalled ( )
256256 } )
@@ -293,15 +293,15 @@ describe('localKVStore', () => {
293293 acceptDelayedBroadcast : false ,
294294 randomizeOutputs : false
295295 }
296- } )
296+ } , undefined )
297297 expect ( mockWallet . signAction ) . not . toHaveBeenCalled ( )
298298 expect ( mockWallet . relinquishOutput ) . not . toHaveBeenCalled ( )
299299 } )
300300
301301 it ( 'should update an existing output (spend and create)' , async ( ) => {
302302 const existingOutpoint = 'oldTxId.0'
303303 const existingOutput = { outpoint : existingOutpoint , txid : 'oldTxId' , vout : 0 , lockingScript : 'oldScriptHex' } // Added script
304- const mockBEEF = [ 1 , 2 , 3 , 4 , 5 , 6 ]
304+ const mockBEEF = [ 1 , 2 , 3 , 4 , 5 , 6 ]
305305 const signableRef = 'signableTxRef123'
306306 const signableTx = [ ]
307307 const updatedTxId = 'updatedTxId'
@@ -366,7 +366,7 @@ describe('localKVStore', () => {
366366 outputs : expect . arrayContaining ( [ // Check outputs array
367367 expect . objectContaining ( { lockingScript : testLockingScriptHex } ) // Check the new output script
368368 ] )
369- } ) )
369+ } ) , undefined )
370370
371371 // Verify signing steps
372372 expect ( MockedTransaction . fromAtomicBEEF ) . toHaveBeenCalledWith ( signableTx )
@@ -383,7 +383,7 @@ describe('localKVStore', () => {
383383 spends : {
384384 0 : { unlockingScript : testUnlockingScriptHex } // Check unlocking script from mock sign result
385385 }
386- } )
386+ } , undefined )
387387 expect ( mockWallet . relinquishOutput ) . not . toHaveBeenCalled ( )
388388 } )
389389
@@ -395,7 +395,7 @@ describe('localKVStore', () => {
395395 const existingOutpoint2 = 'oldTxId2.1'
396396 const existingOutput1 = { outpoint : existingOutpoint1 , txid : 'oldTxId1' , vout : 0 , lockingScript : 's1' }
397397 const existingOutput2 = { outpoint : existingOutpoint2 , txid : 'oldTxId2' , vout : 1 , lockingScript : 's2' }
398- const mockBEEF = [ 1 , 2 , 3 , 4 , 5 , 6 ]
398+ const mockBEEF = [ 1 , 2 , 3 , 4 , 5 , 6 ]
399399 const signableRef = 'signableTxRefMulti'
400400 const signableTx = [ ]
401401 const updatedTxId = 'updatedTxIdMulti'
@@ -457,7 +457,7 @@ describe('localKVStore', () => {
457457 outputs : expect . arrayContaining ( [
458458 expect . objectContaining ( { lockingScript : testLockingScriptHex } )
459459 ] )
460- } ) )
460+ } ) , undefined )
461461
462462 // Verify signing loop
463463 expect ( MockedTransaction . fromAtomicBEEF ) . toHaveBeenCalledWith ( signableTx )
@@ -478,14 +478,14 @@ describe('localKVStore', () => {
478478 0 : { unlockingScript : testUnlockingScriptHex } , // Same mock script for both
479479 1 : { unlockingScript : testUnlockingScriptHex }
480480 }
481- } )
481+ } , undefined )
482482 expect ( mockWallet . relinquishOutput ) . not . toHaveBeenCalled ( )
483483 } )
484484
485485 it ( 'should preserve original error message when createAction fails' , async ( ) => {
486486 const originalErrorMessage = 'Network connection timeout while creating transaction'
487487 const originalError = new Error ( originalErrorMessage )
488-
488+
489489 // Mock the lookupValue to return a value that differs from what we're setting
490490 // to ensure set() will attempt to create a transaction
491491 const mockedLor : ListOutputsResult = {
@@ -533,7 +533,7 @@ describe('localKVStore', () => {
533533 let pushDropInstance : PushDrop // To access the instance methods
534534
535535 beforeEach ( ( ) => {
536- // Get the mock instance that will be created by `new PushDrop()`
536+ // Get the mock instance that will be created by `new PushDrop()`
537537 pushDropInstance = new ( PushDrop as any ) ( )
538538 } )
539539
@@ -598,7 +598,7 @@ describe('localKVStore', () => {
598598 options : {
599599 acceptDelayedBroadcast : false
600600 }
601- } )
601+ } , undefined )
602602 // Check that outputs key is absent
603603 expect ( mockWallet . createAction . mock . calls [ 0 ] [ 0 ] ) . not . toHaveProperty ( 'outputs' )
604604
@@ -619,7 +619,7 @@ describe('localKVStore', () => {
619619 0 : { unlockingScript : testUnlockingScriptHex } ,
620620 1 : { unlockingScript : testUnlockingScriptHex }
621621 }
622- } )
622+ } , undefined )
623623 expect ( mockWallet . relinquishOutput ) . not . toHaveBeenCalled ( )
624624 } )
625625
@@ -659,7 +659,7 @@ describe('localKVStore', () => {
659659 it ( 'should preserve original error message when wallet operations fail during removal' , async ( ) => {
660660 const originalErrorMessage = 'Insufficient funds to cover transaction fees'
661661 const originalError = new Error ( originalErrorMessage )
662-
662+
663663 const existingOutpoint = 'failTxId.0'
664664 const existingOutput = { outpoint : existingOutpoint , txid : 'failTxId' , vout : 0 , lockingScript : 's1' }
665665 const mockBEEF = Buffer . from ( 'mockBEEFFail' )
0 commit comments