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
JavaScript
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