Skip to content

Commit

Permalink
fix final errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Feb 28, 2019
1 parent 75a28e6 commit 2154a65
Show file tree
Hide file tree
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
Expand Up @@ -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);
Expand Down
11 changes: 6 additions & 5 deletions packages/jest-core/src/TestPathPatternPrompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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);
});
}
Expand Down

0 comments on commit 2154a65

Please sign in to comment.