Skip to content

test: avoid repeated killing of exec#498

Merged
9aoy merged 1 commit intomainfrom
exec-killed
Aug 22, 2025
Merged

test: avoid repeated killing of exec#498
9aoy merged 1 commit intomainfrom
exec-killed

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@9aoy 9aoy commented Aug 22, 2025

Summary

test: avoid repeated killing of exec

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings August 22, 2025 03:25
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 22, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 1275e0f
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/68a7e32589d0ca00085271e9
😎 Deploy Preview https://deploy-preview-498--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR prevents potential errors by avoiding repeated killing of an execution process in the test cleanup. The change adds a safety check to ensure the process is only killed if it hasn't already been terminated.

  • Adds a guard condition to prevent double-killing of the CLI execution process

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


onTestFinished(() => {
cli.exec.kill();
!cli.exec.killed && cli.exec.kill();
Copy link

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using optional chaining for better null safety: cli.exec?.killed === false && cli.exec?.kill(). This prevents potential errors if cli.exec is undefined or null.

Suggested change
!cli.exec.killed && cli.exec.kill();
cli.exec?.killed === false && cli.exec?.kill();

Copilot uses AI. Check for mistakes.
@9aoy 9aoy merged commit 3d0e6af into main Aug 22, 2025
17 checks passed
@9aoy 9aoy deleted the exec-killed branch August 22, 2025 03:31
@9aoy 9aoy mentioned this pull request Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants