Skip to content

Commit 72671ab

Browse files
committed
fix final errors
1 parent 75a28e6 commit 72671ab

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

packages/jest-core/src/TestNamePatternPrompt.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
} from 'jest-watcher';
1515
import {TestResult} from '@jest/types';
1616

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

@@ -28,7 +29,7 @@ export default class TestNamePatternPrompt extends PatternPrompt {
2829
this._printPrompt(pattern, options);
2930
}
3031

31-
_printPrompt(pattern: string, options: ScrollOptions) {
32+
_printPrompt(pattern: string) {
3233
const pipe = this._pipe;
3334
printPatternCaret(pattern, pipe);
3435
printRestoredPatternCaret(pattern, this._currentUsageRows, pipe);

packages/jest-core/src/TestPathPatternPrompt.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ type SearchSources = Array<{
2222
searchSource: SearchSource;
2323
}>;
2424

25+
// TODO: Make underscored props `private`
2526
export default class TestPathPatternPrompt extends PatternPrompt {
26-
_searchSources: SearchSources;
27+
_searchSources?: SearchSources;
2728

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

3334
_onChange(pattern: string, options: ScrollOptions) {
3435
super._onChange(pattern, options);
35-
this._printPrompt(pattern, options);
36+
this._printPrompt(pattern);
3637
}
3738

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

5152
let tests: Array<Test> = [];
52-
if (regex) {
53-
this._searchSources.forEach(({searchSource, context}) => {
53+
if (regex && this._searchSources) {
54+
this._searchSources.forEach(({searchSource}) => {
5455
tests = tests.concat(searchSource.findMatchingTests(pattern).tests);
5556
});
5657
}

0 commit comments

Comments
 (0)