UNPKG

git-aiflow

Version:

šŸš€ An AI-powered workflow automation tool for effortless Git-based development, combining smart GitLab/GitHub merge & pull request creation with Conan package management.

58 lines • 1.95 kB
#!/usr/bin/env node import { exec } from 'child_process'; import { promisify } from 'util'; const execAsync = promisify(exec); /** * Run all GitService new methods tests */ async function runAllGitTests() { console.log('šŸš€ Running All GitService New Methods Tests'); console.log('='.repeat(60)); const testFiles = [ 'git-service-new-methods.test.ts', 'git-service-branch-operations.test.ts', 'git-service-branch-graph.test.ts' ]; let totalTests = 0; let passedTests = 0; for (const testFile of testFiles) { console.log(`\nšŸ“ Running ${testFile}...`); console.log('-'.repeat(40)); try { const { stdout, stderr } = await execAsync(`npx tsx src/test/${testFile}`); if (stdout) { console.log(stdout); } if (stderr) { console.error(stderr); } // Count test results from output const testMatches = stdout.match(/āœ… Test \d+:/g); const passedMatches = stdout.match(/āœ… Test \d+:/g); if (testMatches) { totalTests += testMatches.length; } if (passedMatches) { passedTests += passedMatches.length; } console.log(`āœ… ${testFile} completed`); } catch (error) { console.error(`āŒ ${testFile} failed:`, error); } } console.log('\n' + '='.repeat(60)); console.log(`šŸ“Š Overall Test Results: ${passedTests}/${totalTests} tests passed`); if (passedTests === totalTests) { console.log('šŸŽ‰ All GitService tests passed successfully!'); } else { console.log(`āš ļø ${totalTests - passedTests} tests failed`); } } // Run all tests runAllGitTests().catch(error => { console.error('āŒ Unhandled error:', error); process.exit(1); }); //# sourceMappingURL=run-git-tests.js.map