Skip to content

chore: should not clearLogs in debug mode#496

Merged
9aoy merged 1 commit intomainfrom
debug-clearLogs
Aug 22, 2025
Merged

chore: should not clearLogs in debug mode#496
9aoy merged 1 commit intomainfrom
debug-clearLogs

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@9aoy 9aoy commented Aug 21, 2025

Summary

should not clearLogs in debug mode.

Related Links

Checklist

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

Copilot AI review requested due to automatic review settings August 21, 2025 11:54
@netlify
Copy link
Copy Markdown

netlify bot commented Aug 21, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit b9a91a8
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/68a7090fc0020b0008d2d328
😎 Deploy Preview https://deploy-preview-496--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 log clearing in debug mode to improve debugging experience. The change adds a condition to skip clearing the console when debug mode is enabled, allowing developers to retain console output for troubleshooting.

  • Imports isDebug utility function to check debug mode status
  • Adds conditional logic to skip console clearing when in debug mode

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

@@ -171,7 +176,9 @@ export async function runTests(context: RstestContext): Promise<void> {
}
};
const clearLogs = () => {
Copy link

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

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

[nitpick] Consider adding a comment explaining why logs are preserved in debug mode, as this behavior change may not be immediately obvious to other developers.

Suggested change
const clearLogs = () => {
const clearLogs = () => {
// In debug mode, we intentionally preserve logs to aid debugging.

Copilot uses AI. Check for mistakes.
@9aoy 9aoy merged commit 5084131 into main Aug 22, 2025
34 of 37 checks passed
@9aoy 9aoy deleted the debug-clearLogs branch August 22, 2025 03:00
@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