fix(tstest): Clear timeout identifiers after successful test execution and add local CLAUDE settings
This commit is contained in:
		| @@ -153,8 +153,10 @@ export class TsTest { | ||||
|     // Handle timeout if specified | ||||
|     if (this.timeoutSeconds !== null) { | ||||
|       const timeoutMs = this.timeoutSeconds * 1000; | ||||
|       let timeoutId: NodeJS.Timeout; | ||||
|        | ||||
|       const timeoutPromise = new Promise<void>((_resolve, reject) => { | ||||
|         setTimeout(() => { | ||||
|         timeoutId = setTimeout(() => { | ||||
|           execResultStreaming.childProcess.kill('SIGTERM'); | ||||
|           reject(new Error(`Test file timed out after ${this.timeoutSeconds} seconds`)); | ||||
|         }, timeoutMs); | ||||
| @@ -165,6 +167,8 @@ export class TsTest { | ||||
|           tapParser.handleTapProcess(execResultStreaming.childProcess), | ||||
|           timeoutPromise | ||||
|         ]); | ||||
|         // Clear timeout if test completed successfully | ||||
|         clearTimeout(timeoutId); | ||||
|       } catch (error) { | ||||
|         // Handle timeout error | ||||
|         tapParser.handleTimeout(this.timeoutSeconds); | ||||
| @@ -294,8 +298,10 @@ export class TsTest { | ||||
|     // Handle timeout if specified | ||||
|     if (this.timeoutSeconds !== null) { | ||||
|       const timeoutMs = this.timeoutSeconds * 1000; | ||||
|       let timeoutId: NodeJS.Timeout; | ||||
|        | ||||
|       const timeoutPromise = new Promise<void>((_resolve, reject) => { | ||||
|         setTimeout(() => { | ||||
|         timeoutId = setTimeout(() => { | ||||
|           reject(new Error(`Test file timed out after ${this.timeoutSeconds} seconds`)); | ||||
|         }, timeoutMs); | ||||
|       }); | ||||
| @@ -305,6 +311,8 @@ export class TsTest { | ||||
|           evaluatePromise, | ||||
|           timeoutPromise | ||||
|         ]); | ||||
|         // Clear timeout if test completed successfully | ||||
|         clearTimeout(timeoutId); | ||||
|       } catch (error) { | ||||
|         // Handle timeout error | ||||
|         tapParser.handleTimeout(this.timeoutSeconds); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user