Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix final errors
Browse files Browse the repository at this point in the history
SimenB committed Feb 28, 2019

Partially verified

This commit is signed with the committer’s verified signature.
the-mikedavis’s contribution has been verified via SSH key.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
1 parent 75a28e6 commit 2154a65
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/jest-core/src/TestNamePatternPrompt.ts
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ export default class TestNamePatternPrompt extends PatternPrompt {
this._printPrompt(pattern, options);
}

_printPrompt(pattern: string, options: ScrollOptions) {
_printPrompt(pattern: string) {
const pipe = this._pipe;
printPatternCaret(pattern, pipe);
printRestoredPatternCaret(pattern, this._currentUsageRows, pipe);
11 changes: 6 additions & 5 deletions packages/jest-core/src/TestPathPatternPrompt.ts
Original file line number Diff line number Diff line change
@@ -22,8 +22,9 @@ type SearchSources = Array<{
searchSource: SearchSource;
}>;

// TODO: Make underscored props `private`
export default class TestPathPatternPrompt extends PatternPrompt {
_searchSources: SearchSources;
_searchSources?: SearchSources;

constructor(pipe: NodeJS.WritableStream, prompt: Prompt) {
super(pipe, prompt);
@@ -32,10 +33,10 @@ export default class TestPathPatternPrompt extends PatternPrompt {

_onChange(pattern: string, options: ScrollOptions) {
super._onChange(pattern, options);
this._printPrompt(pattern, options);
this._printPrompt(pattern);
}

_printPrompt(pattern: string, options: ScrollOptions) {
_printPrompt(pattern: string) {
const pipe = this._pipe;
printPatternCaret(pattern, pipe);
printRestoredPatternCaret(pattern, this._currentUsageRows, pipe);
@@ -49,8 +50,8 @@ export default class TestPathPatternPrompt extends PatternPrompt {
} catch (e) {}

let tests: Array<Test> = [];
if (regex) {
this._searchSources.forEach(({searchSource, context}) => {
if (regex && this._searchSources) {
this._searchSources.forEach(({searchSource}) => {
tests = tests.concat(searchSource.findMatchingTests(pattern).tests);
});
}

0 comments on commit 2154a65

Please sign in to comment.