Skip to content

Commit

Permalink
Use a better console-clearing string on Windows (#5251)
Browse files Browse the repository at this point in the history
* Use a better console-clearing string on Windows

* Update CHANGELOG.md
  • Loading branch information
gaearon authored and cpojer committed Jan 9, 2018
1 parent 93acfb0 commit cd807f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
custom matchers. ([#5162](https://github.com/facebook/jest/pull/5162))
* `[pretty-format]` Pretty format for DOMStringMap and NamedNodeMap
([#5233](https://github.com/facebook/jest/pull/5233))
* `[jest-cli]` Use a better console-clearing string on Windows
([#5251](https://github.com/facebook/jest/pull/5251))

### Features

Expand Down
2 changes: 1 addition & 1 deletion packages/jest-cli/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

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

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

export const KEYS = {
A: '61',
Expand Down

0 comments on commit cd807f3

Please sign in to comment.