-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interactive Snapshot Update mode #3831
Changes from 1 commit
947805e
290aaab
cbced77
916bcf2
81d73e1
736e666
32127da
8068f36
0c7343d
8b1b701
45e4e1f
eec3d43
f8d4c38
c545898
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,5 @@ npm-debug.log | |
npm-debug.log* | ||
yarn-error.log* | ||
|
||
|
||
# JetBrains IDE | ||
.idea/* | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,9 @@ import type {AggregatedResult} from 'types/TestResult'; | |
const chalk = require('chalk'); | ||
const ansiEscapes = require('ansi-escapes'); | ||
const {pluralize} = require('./reporters/utils'); | ||
const {rightPad} = require('./lib/terminal_utils'); | ||
const {KEYS} = require('./constants'); | ||
|
||
module.exports = class SnapshotInteractiveMode { | ||
export default class SnapshotInteractiveMode { | ||
_pipe: stream$Writable | tty$WriteStream; | ||
_isActive: boolean; | ||
_updateTestRunnerConfig: (path: string, shouldUpdateSnapshot: boolean) => *; | ||
|
@@ -36,13 +35,6 @@ module.exports = class SnapshotInteractiveMode { | |
this._pipe.write(ansiEscapes.scrollDown); | ||
this._pipe.write(ansiEscapes.scrollDown); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason why do we have to scroll down? Removing these 2 lines leaves the functionality unchanged on iTerm and macOS Terminal. |
||
|
||
// this._pipe.write(ansiEscapes.cursorSavePosition); | ||
// this._pipe.write(ansiEscapes.cursorTo(0, 0)); | ||
// | ||
// const title = rightPad(' -> Interactive Snapshot Update Activated <-'); | ||
// this._pipe.write(chalk.black.bold.bgYellow(title)); | ||
// | ||
// this._pipe.write(ansiEscapes.cursorRestorePosition); | ||
this._pipe.write(ansiEscapes.cursorUp(6)); | ||
this._pipe.write(ansiEscapes.eraseDown); | ||
|
||
|
@@ -141,4 +133,4 @@ module.exports = class SnapshotInteractiveMode { | |
this._isActive = true; | ||
this._run(false); | ||
} | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const getFailedSnapshotTests = require('../get_failed_snapshot_tests'); | ||
import getFailedSnapshotTests from '../get_failed_snapshot_tests'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing a license not with |
||
|
||
test('return a list of path', () => { | ||
const targetFilename = 'somewhere.js'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be a part of your global gitignore, but I'm not against leaving this here