feat(watch mode): Add watch mode support with CLI options and enhanced documentation
This commit is contained in:
		| @@ -520,4 +520,47 @@ export class TsTestLogger { | ||||
|      | ||||
|     return diff; | ||||
|   } | ||||
|    | ||||
|   // Watch mode methods | ||||
|   watchModeStart() { | ||||
|     if (this.options.json) { | ||||
|       this.logJson({ event: 'watchModeStart' }); | ||||
|       return; | ||||
|     } | ||||
|      | ||||
|     this.log(this.format('\n👀 Watch Mode', 'cyan')); | ||||
|     this.log(this.format('   Running tests in watch mode...', 'dim')); | ||||
|     this.log(this.format('   Press Ctrl+C to exit\n', 'dim')); | ||||
|   } | ||||
|    | ||||
|   watchModeWaiting() { | ||||
|     if (this.options.json) { | ||||
|       this.logJson({ event: 'watchModeWaiting' }); | ||||
|       return; | ||||
|     } | ||||
|      | ||||
|     this.log(this.format('\n   Waiting for file changes...', 'dim')); | ||||
|   } | ||||
|    | ||||
|   watchModeRerun(changedFiles: string[]) { | ||||
|     if (this.options.json) { | ||||
|       this.logJson({ event: 'watchModeRerun', changedFiles }); | ||||
|       return; | ||||
|     } | ||||
|      | ||||
|     this.log(this.format('\n🔄 File changes detected:', 'cyan')); | ||||
|     changedFiles.forEach(file => { | ||||
|       this.log(this.format(`   • ${file}`, 'yellow')); | ||||
|     }); | ||||
|     this.log(this.format('\n   Re-running tests...\n', 'dim')); | ||||
|   } | ||||
|    | ||||
|   watchModeStop() { | ||||
|     if (this.options.json) { | ||||
|       this.logJson({ event: 'watchModeStop' }); | ||||
|       return; | ||||
|     } | ||||
|      | ||||
|     this.log(this.format('\n\n👋 Stopping watch mode...', 'cyan')); | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user