// Simple test to verify Holon functionality import { holosphereService } from './HoloSphereService' export async function testHolonFunctionality() { console.log('๐Ÿงช Testing Holon functionality...') try { // Test initialization const isInitialized = await holosphereService.initialize() console.log('โœ… HoloSphere initialized:', isInitialized) if (!isInitialized) { console.log('โŒ HoloSphere not initialized, skipping tests') return false } // Test getting a holon const holonId = await holosphereService.getHolon(40.7128, -74.0060, 7) console.log('โœ… Got holon ID:', holonId) if (holonId) { // Test storing data const testData = { id: 'test-1', content: 'Hello from Holon!', timestamp: Date.now() } const storeSuccess = await holosphereService.putData(holonId, 'test', testData) console.log('โœ… Stored data:', storeSuccess) // Test retrieving data const retrievedData = await holosphereService.getData(holonId, 'test') console.log('โœ… Retrieved data:', retrievedData) // Test getting hierarchy const hierarchy = holosphereService.getHolonHierarchy(holonId) console.log('โœ… Holon hierarchy:', hierarchy) // Test getting scalespace const scalespace = holosphereService.getHolonScalespace(holonId) console.log('โœ… Holon scalespace:', scalespace) } console.log('โœ… All Holon tests passed!') return true } catch (error) { console.error('โŒ Holon test failed:', error) return false } } // Auto-run test when imported if (typeof window !== 'undefined') { testHolonFunctionality() }