mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-03 10:14:52 +00:00
27 lines
931 B
TypeScript
27 lines
931 B
TypeScript
import { ASTLambdaRefactor } from './ast-lambda-refactor'
|
|
import * as fs from 'fs/promises'
|
|
import * as path from 'path'
|
|
import { findLargeFiles } from './reporting/find-large-files'
|
|
import { generateProgressReport } from './reporting/generate-progress-report'
|
|
import { runCommand } from './cli/utils/run-command'
|
|
|
|
export async function runTests(): Promise<boolean> {
|
|
if (this.options.skipTest || this.options.dryRun) {
|
|
return true
|
|
}
|
|
|
|
console.log('\n' + '='.repeat(70))
|
|
console.log('PHASE 3: TESTING')
|
|
console.log('='.repeat(70) + '\n')
|
|
|
|
try {
|
|
this.log('Running unit tests...', 'info')
|
|
await runCommand('npm test -- --run', { ignoreError: true })
|
|
this.log('Tests completed', 'success')
|
|
return true
|
|
} catch (error) {
|
|
this.log('Some tests may need updates (this is normal)', 'warning')
|
|
return true // Don't fail on test errors
|
|
}
|
|
}
|