Conversation
✅ Deploy Preview for rstest-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull Request Overview
This PR changes the screen clearing mechanism from console.clear() to using ANSI escape sequences (console.log('\x1Bc')) for better terminal control. The change renames the function from clearLogs to clearScreen to better reflect its purpose and updates all call sites accordingly.
- Replaces
console.clear()with ANSI escape sequence\x1Bcfor screen clearing - Renames function from
clearLogstoclearScreenfor better semantic clarity - Updates all function calls throughout the watch mode handlers
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/core/src/core/runTests.ts
Outdated
| const clearScreen = () => { | ||
| if (!isDebug()) { | ||
| console.clear(); | ||
| // clear screen |
There was a problem hiding this comment.
[nitpick] The comment 'clear screen' is redundant given the clear function name clearScreen. Consider removing this comment or making it more descriptive about why ANSI escape sequences are used instead of console.clear().
| // clear screen | |
| // Use ANSI escape sequence to clear the screen, as console.clear() may not work reliably in all environments |
fi3ework
left a comment
There was a problem hiding this comment.
is the console.clear in packages/core/src/core/cliShortcuts.ts should be repalced as well?
nice catch! |
Summary
use clearScreen instead of clearLogs.
Related Links
Checklist