Skip to content

Commit cd807f3

Browse files
gaearoncpojer
authored andcommitted
Use a better console-clearing string on Windows (#5251)
* Use a better console-clearing string on Windows * Update CHANGELOG.md
1 parent 93acfb0 commit cd807f3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
custom matchers. ([#5162](https://github.com/facebook/jest/pull/5162))
2222
* `[pretty-format]` Pretty format for DOMStringMap and NamedNodeMap
2323
([#5233](https://github.com/facebook/jest/pull/5233))
24+
* `[jest-cli]` Use a better console-clearing string on Windows
25+
([#5251](https://github.com/facebook/jest/pull/5251))
2426

2527
### Features
2628

packages/jest-cli/src/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
const isWindows = process.platform === 'win32';
1111

12-
export const CLEAR = isWindows ? '\x1Bc' : '\x1B[2J\x1B[3J\x1B[H';
12+
export const CLEAR = isWindows ? '\x1B[2J\x1B[0f' : '\x1B[2J\x1B[3J\x1B[H';
1313

1414
export const KEYS = {
1515
A: '61',

0 commit comments

Comments
 (0)