15 lines
521 B
JavaScript
15 lines
521 B
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const HISTORY_FILE = path.join(__dirname, 'test-history.json');
|
|
|
|
console.log('Testing history file...');
|
|
if (fs.existsSync(HISTORY_FILE)) {
|
|
const data = fs.readFileSync(HISTORY_FILE, 'utf-8');
|
|
const history = JSON.parse(data);
|
|
console.log('✅ History loaded successfully');
|
|
console.log('Records:', history.records.length);
|
|
console.log('Last updated:', new Date(history.lastUpdated).toISOString());
|
|
} else {
|
|
console.log('❌ History file not found');
|
|
} |