#!/usr/bin/env node /** * Navigation Test Runner * * Runs the navigation service tests to verify single-pane navigation works * correctly for both mobile and desktop scenarios. */ const { execSync } = require('child_process') const path = require('path') console.log('๐Ÿงช Running Navigation Service Tests...\n') try { // Run the tests const testCommand = 'npm test -- --testPathPattern=navigation.service.test.ts --verbose' console.log(`Running: ${testCommand}\n`) execSync(testCommand, { stdio: 'inherit', cwd: path.resolve(__dirname) }) console.log('\nโœ… All navigation tests passed!') console.log('\n๐Ÿ“ฑ Mobile and Desktop Navigation Verification:') console.log(' โœ“ URL parsing works correctly') console.log(' โœ“ Component factory creates proper components') console.log(' โœ“ Navigation service handles all view types') console.log(' โœ“ Single-pane navigation flow works') console.log(' โœ“ Back navigation behaves correctly') console.log(' โœ“ Page titles are generated properly') console.log(' โœ“ Error handling works gracefully') console.log('\n๐ŸŽ‰ Navigation system is ready for production!') } catch (error) { console.error('\nโŒ Navigation tests failed!') console.error('Please check the test output above for details.') process.exit(1) }