feat(core): improve in-memory validation, FatturaPA detection coverage, and published type compatibility
This commit is contained in:
@@ -185,7 +185,8 @@ export class ConformanceTestHarness {
|
||||
r.source === 'Schematron'
|
||||
);
|
||||
} catch (error) {
|
||||
console.warn(`Schematron not available for ${sample.format}: ${error.message}`);
|
||||
const errorMessage = error instanceof Error ? error.message : String(error);
|
||||
console.warn(`Schematron not available for ${sample.format}: ${errorMessage}`);
|
||||
}
|
||||
|
||||
// Aggregate results
|
||||
@@ -202,12 +203,13 @@ export class ConformanceTestHarness {
|
||||
result.passed = result.errors.length === 0 === sample.expectedValid;
|
||||
|
||||
} catch (error) {
|
||||
console.error(`Error testing ${sample.name}: ${error.message}`);
|
||||
const errorMessage = error instanceof Error ? error.message : String(error);
|
||||
console.error(`Error testing ${sample.name}: ${errorMessage}`);
|
||||
result.errors.push({
|
||||
ruleId: 'TEST-ERROR',
|
||||
source: 'TestHarness',
|
||||
severity: 'error',
|
||||
message: `Test execution failed: ${error.message}`
|
||||
message: `Test execution failed: ${errorMessage}`
|
||||
});
|
||||
}
|
||||
|
||||
@@ -588,4 +590,4 @@ export async function runConformanceTests(
|
||||
// Generate HTML report
|
||||
await harness.generateHTMLReport();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user