No content changes: git diff --ignore-all-space over these files is empty. The churn came from editing on Windows against a repo checked out with LF.
34 lines
919 B
JavaScript
34 lines
919 B
JavaScript
const BASE_URL = 'http://localhost:3000/api/test-correction';
|
|
|
|
async function runCorrectionTests() {
|
|
console.log('=== RUNNING OCR INTELLIGENT CORRECTION & Auto-FILL TESTS ===');
|
|
|
|
try {
|
|
const res = await fetch(BASE_URL);
|
|
if (!res.ok) {
|
|
console.error(`Failed to hit test endpoint, status: ${res.status}`);
|
|
process.exit(1);
|
|
}
|
|
|
|
const data = await res.json();
|
|
console.log(`Test suite status: ${data.status.toUpperCase()}`);
|
|
|
|
for (const result of data.results) {
|
|
console.log(result);
|
|
}
|
|
|
|
if (data.status === 'success') {
|
|
console.log('\nALL OCR CORRECTION TESTS PASSED SUCCESSFULLY! ✅');
|
|
process.exit(0);
|
|
} else {
|
|
console.error('\nSOME TEST CASES FAILED! ❌');
|
|
process.exit(1);
|
|
}
|
|
} catch (err) {
|
|
console.error('Test run error:', err);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
runCorrectionTests();
|