feat(tests): fully implemented test suite
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { tap, expect } from '@push.rocks/tapbundle';
|
||||
import { tap, expect } from '@git.zone/tstest/tapbundle';
|
||||
import {
|
||||
EInvoice,
|
||||
EInvoiceError,
|
||||
@ -55,7 +55,7 @@ tap.test('Error Handling - XML recovery for common issues', async () => {
|
||||
const bomError = new EInvoiceParsingError('BOM detected', { xmlSnippet: xmlWithBOM.substring(0, 50) });
|
||||
|
||||
const bomRecovery = await ErrorRecovery.attemptXMLRecovery(xmlWithBOM, bomError);
|
||||
expect(bomRecovery.success).toBeTruthy();
|
||||
expect(bomRecovery.success).toBeTrue();
|
||||
expect(bomRecovery.cleanedXml).toBeTruthy();
|
||||
expect(bomRecovery.cleanedXml!.charCodeAt(0)).not.toEqual(0xFEFF);
|
||||
console.log('✓ BOM removal recovery successful');
|
||||
@ -65,7 +65,7 @@ tap.test('Error Handling - XML recovery for common issues', async () => {
|
||||
const ampError = new EInvoiceParsingError('Unescaped ampersand', {});
|
||||
|
||||
const ampRecovery = await ErrorRecovery.attemptXMLRecovery(xmlWithAmpersand, ampError);
|
||||
expect(ampRecovery.success).toBeTruthy();
|
||||
expect(ampRecovery.success).toBeTrue();
|
||||
if (ampRecovery.cleanedXml) {
|
||||
expect(ampRecovery.cleanedXml).toInclude('&');
|
||||
console.log('✓ Ampersand escaping recovery successful');
|
||||
|
Reference in New Issue
Block a user