mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
fix<compiler>: reread the testfilter file if filter enabled during the watch process (#29775)
Resolve #29720 In the above PR, I overlooked that we can change the filter mode during the watch process. Now it's fixed.
This commit is contained in:
@@ -189,7 +189,7 @@ function subscribeKeyEvents(
|
||||
state: RunnerState,
|
||||
onChange: (state: RunnerState) => void
|
||||
) {
|
||||
process.stdin.on("keypress", (str, key) => {
|
||||
process.stdin.on("keypress", async (str, key) => {
|
||||
if (key.name === "u") {
|
||||
// u => update fixtures
|
||||
state.mode.action = RunnerAction.Update;
|
||||
@@ -197,6 +197,7 @@ function subscribeKeyEvents(
|
||||
process.exit(0);
|
||||
} else if (key.name === "f") {
|
||||
state.mode.filter = !state.mode.filter;
|
||||
state.filter = state.mode.filter ? await readTestFilter() : null;
|
||||
state.mode.action = RunnerAction.Test;
|
||||
} else {
|
||||
// any other key re-runs tests
|
||||
|
||||
Reference in New Issue
Block a user