|  |  | @ -26,6 +26,9 @@ beforeEach(() => { | 
			
		
	
		
		
			
				
					
					|  |  |  |   mockAdd = mock(() => Promise.resolve()); |  |  |  |   mockAdd = mock(() => Promise.resolve()); | 
			
		
	
		
		
			
				
					
					|  |  |  |   ResponseQueue.add = mockAdd; |  |  |  |   ResponseQueue.add = mockAdd; | 
			
		
	
		
		
			
				
					
					|  |  |  |    |  |  |  |    | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   // Inject testDb for WebhookServer to use
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   WebhookServer.dbInstance = testDb; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |    | 
			
		
	
		
		
			
				
					
					|  |  |  |   // Ensure database is initialized (recreates tables if dropped)
 |  |  |  |   // Ensure database is initialized (recreates tables if dropped)
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   initializeDatabase(testDb); |  |  |  |   initializeDatabase(testDb); | 
			
		
	
		
		
			
				
					
					|  |  |  |    |  |  |  |    | 
			
		
	
	
		
		
			
				
					|  |  | @ -373,9 +376,7 @@ describe('WebhookServer', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |           remoteJid: 'group-id@g.us', |  |  |  |           remoteJid: 'group-id@g.us', | 
			
		
	
		
		
			
				
					
					|  |  |  |           participant: 'sender-id@s.whatsapp.net' |  |  |  |           participant: 'sender-id@s.whatsapp.net' | 
			
		
	
		
		
			
				
					
					|  |  |  |         }, |  |  |  |         }, | 
			
		
	
		
		
			
				
					
					|  |  |  |         message: {  |  |  |  |         message: { conversation: `/tarea nueva Test task ${futureDate1} some text ${futureDate2}` } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           conversation: `/tarea nueva Test task ${futureDate1} some text ${futureDate2}` |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |     }; |  |  |  |     }; | 
			
		
	
		
		
			
				
					
					|  |  |  |      |  |  |  |      | 
			
		
	
	
		
		
			
				
					|  |  | @ -401,9 +402,7 @@ describe('WebhookServer', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |           remoteJid: 'group-id@g.us', |  |  |  |           remoteJid: 'group-id@g.us', | 
			
		
	
		
		
			
				
					
					|  |  |  |           participant: 'sender-id@s.whatsapp.net' |  |  |  |           participant: 'sender-id@s.whatsapp.net' | 
			
		
	
		
		
			
				
					
					|  |  |  |         }, |  |  |  |         }, | 
			
		
	
		
		
			
				
					
					|  |  |  |         message: {  |  |  |  |         message: { conversation: `/tarea nueva Test task ${pastDate} more text ${futureDate}` } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           conversation: `/tarea nueva Test task ${pastDate} more text ${futureDate}` |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |     }; |  |  |  |     }; | 
			
		
	
		
		
			
				
					
					|  |  |  |      |  |  |  |      | 
			
		
	
	
		
		
			
				
					|  |  | @ -429,9 +428,7 @@ describe('WebhookServer', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |           remoteJid: 'group-id@g.us', |  |  |  |           remoteJid: 'group-id@g.us', | 
			
		
	
		
		
			
				
					
					|  |  |  |           participant: 'sender-id@s.whatsapp.net' |  |  |  |           participant: 'sender-id@s.whatsapp.net' | 
			
		
	
		
		
			
				
					
					|  |  |  |         }, |  |  |  |         }, | 
			
		
	
		
		
			
				
					
					|  |  |  |         message: {  |  |  |  |         message: { conversation: `/tarea nueva Test task ${pastDate1} and ${pastDate2}` } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           conversation: `/tarea nueva Test task ${pastDate1} and ${pastDate2}` |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |     }; |  |  |  |     }; | 
			
		
	
		
		
			
				
					
					|  |  |  |      |  |  |  |      | 
			
		
	
	
		
		
			
				
					|  |  | @ -456,9 +453,7 @@ describe('WebhookServer', () => { | 
			
		
	
		
		
			
				
					
					|  |  |  |           remoteJid: 'group-id@g.us', |  |  |  |           remoteJid: 'group-id@g.us', | 
			
		
	
		
		
			
				
					
					|  |  |  |           participant: 'sender-id@s.whatsapp.net' |  |  |  |           participant: 'sender-id@s.whatsapp.net' | 
			
		
	
		
		
			
				
					
					|  |  |  |         }, |  |  |  |         }, | 
			
		
	
		
		
			
				
					
					|  |  |  |         message: {  |  |  |  |         message: { conversation: `/tarea nueva Test task 2023-13-01 (invalid) ${futureDate} 25/12/2023 (invalid)` } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |           conversation: `/tarea nueva Test task 2023-13-01 (invalid) ${futureDate} 25/12/2023 (invalid)` |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         } |  |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |       } |  |  |  |       } | 
			
		
	
		
		
			
				
					
					|  |  |  |     }; |  |  |  |     }; | 
			
		
	
		
		
			
				
					
					|  |  |  |      |  |  |  |      | 
			
		
	
	
		
		
			
				
					|  |  | 
 |