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 72671ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion packages/jest-core/src/TestNamePatternPrompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
} from 'jest-watcher';
import {TestResult} from '@jest/types';

// TODO: Make underscored props `private`
export default class TestNamePatternPrompt extends PatternPrompt {
_cachedTestResults: Array<TestResult.TestResult>;

Expand All @@ -28,7 +29,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 72671ab

Please sign in to comment.