Skip to content

Commit 598cd7e

Browse files
cristotodevclaude
andcommitted
fix: resolve failing unit and integration tests
- Remove console.error from productos tool error handling to prevent stderr output in tests - Add missing solo_pagadas parameter to periodo object in facturaclientes tool error responses - Ensure consistent response structure between success and error cases in get_clientes_top_facturacion - All 620 tests now pass successfully 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 19bc75f commit 598cd7e

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

  • src/modules

src/modules/core-business/productos/tool.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ export const noVendidosToolImplementation = async (args: any, client: any) => {
188188
};
189189

190190
} catch (error) {
191-
console.error('Error in get_productos_no_vendidos:', error);
192191
return {
193192
content: [{
194193
type: 'text',

src/modules/sales-orders/facturaclientes/tool.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ export async function toolClientesTopFacturacionImplementation(
489489
{
490490
type: 'text' as const,
491491
text: JSON.stringify({
492-
periodo: { fecha_desde, fecha_hasta },
492+
periodo: { fecha_desde, fecha_hasta, solo_pagadas },
493493
message: `No se encontraron facturas en el período del ${fecha_desde} al ${fecha_hasta}`,
494494
meta: {
495495
total: 0,
@@ -516,7 +516,7 @@ export async function toolClientesTopFacturacionImplementation(
516516
{
517517
type: 'text' as const,
518518
text: JSON.stringify({
519-
periodo: { fecha_desde, fecha_hasta },
519+
periodo: { fecha_desde, fecha_hasta, solo_pagadas },
520520
message: solo_pagadas
521521
? `No se encontraron facturas pagadas en el período del ${fecha_desde} al ${fecha_hasta}`
522522
: `No se encontraron facturas en el período del ${fecha_desde} al ${fecha_hasta}`,

0 commit comments

Comments
 (0)