27 lines
817 B
JavaScript
27 lines
817 B
JavaScript
|
|
// Simple validation script to check if the stores load correctly
|
||
|
|
import { contactsStore } from './src/lib/stores/contactsStore.js';
|
||
|
|
import { expenseStore } from './src/lib/stores/expenseStore.js';
|
||
|
|
import { walletStore } from './src/lib/stores/walletStore.js';
|
||
|
|
|
||
|
|
console.log('Validating stores...');
|
||
|
|
|
||
|
|
// Check if stores loaded correctly
|
||
|
|
let storeStatus = {
|
||
|
|
contactsStore: !!contactsStore,
|
||
|
|
expenseStore: !!expenseStore,
|
||
|
|
walletStore: !!walletStore
|
||
|
|
};
|
||
|
|
|
||
|
|
console.log('Store validation status:', storeStatus);
|
||
|
|
|
||
|
|
// Try to get subscribers
|
||
|
|
try {
|
||
|
|
const unsub1 = contactsStore.subscribe(() => {});
|
||
|
|
unsub1();
|
||
|
|
console.log('✓ contactsStore subscribe test passed');
|
||
|
|
} catch (e) {
|
||
|
|
console.error('✗ contactsStore subscribe test failed:', e.message);
|
||
|
|
}
|
||
|
|
|
||
|
|
// Exit with success
|
||
|
|
console.log('Stores validation completed');
|