31 lines
1006 B
JavaScript
31 lines
1006 B
JavaScript
// test_satloc_parser.js
|
|
const { SatLocLogParser } = require('./helpers/satloc_log_parser');
|
|
|
|
async function test() {
|
|
const logFile = './test-logs/Liquid_IF2_G4.log';
|
|
// const logFile = './test-logs/satlog-8ea46d9c-9815-462f-9e80-d1396135ae9c.log';
|
|
console.log(`Testing updated parser with: ${logFile}`);
|
|
|
|
// Test with checksum validation enabled to see if our fix works
|
|
const parser = new SatLocLogParser({
|
|
debug: true,
|
|
validateChecksums: true
|
|
});
|
|
|
|
try {
|
|
console.log('Starting parse with checksum validation...');
|
|
const result = await parser.parseFile(logFile, { fileId: 'test.log' });
|
|
console.log('Parse completed:', result.success);
|
|
console.log('Statistics:', parser.getStatistics());
|
|
|
|
if (result.applicationDetails && result.applicationDetails.length > 0) {
|
|
console.log('\nSample application details:');
|
|
console.log(result.applicationDetails.slice(0, 2));
|
|
}
|
|
} catch (error) {
|
|
console.error('Parse error:', error);
|
|
}
|
|
}
|
|
|
|
test();
|