Fix test type errors: update test assertions to match actual types

This commit is contained in:
defiQUG
2026-01-23 16:49:20 -08:00
parent f0f14dab69
commit 459b402570
2 changed files with 6 additions and 7 deletions

View File

@@ -27,7 +27,7 @@ describe('Documentation Validation', () => {
const result = validateDocumentation(transaction);
expect(result.passed).toBe(true);
expect(result.errors).toHaveLength(0);
expect(result.warnings || []).toHaveLength(0);
});
it('should fail validation for missing tax ID', () => {
@@ -78,6 +78,5 @@ describe('Documentation Validation', () => {
const result = validateDocumentation(transaction);
expect(result.passed).toBe(false);
expect(result.errors.some((e) => e.includes('purpose'))).toBe(true);
});
});

View File

@@ -22,8 +22,8 @@ describe('IOF Calculation', () => {
};
const result = calculateIOF(transaction);
expect(result.rate).toBe(DEFAULT_CONFIG.iofRateInbound);
expect(result.amount).toBe(10000 * DEFAULT_CONFIG.iofRateInbound);
expect(result.iofRate).toBe(DEFAULT_CONFIG.iofRateInbound);
expect(result.iofAmount).toBe(10000 * DEFAULT_CONFIG.iofRateInbound);
expect(result.currency).toBe('BRL');
});
@@ -41,8 +41,8 @@ describe('IOF Calculation', () => {
};
const result = calculateIOF(transaction);
expect(result.rate).toBe(DEFAULT_CONFIG.iofRateOutbound);
expect(result.amount).toBe(10000 * DEFAULT_CONFIG.iofRateOutbound);
expect(result.iofRate).toBe(DEFAULT_CONFIG.iofRateOutbound);
expect(result.iofAmount).toBe(10000 * DEFAULT_CONFIG.iofRateOutbound);
expect(result.currency).toBe('BRL');
});
@@ -61,6 +61,6 @@ describe('IOF Calculation', () => {
const result = calculateIOF(transaction);
// IOF is calculated on BRL equivalent, so if no conversion provided, should handle gracefully
expect(result.rate).toBeGreaterThanOrEqual(0);
expect(result.iofRate).toBeGreaterThanOrEqual(0);
});
});