Skip to content

Commit

Permalink
fix<compiler>: reread the testfilter file if filter enabled during th…
Browse files Browse the repository at this point in the history
…e 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.
  • Loading branch information
TrickyPi authored Jun 6, 2024
1 parent 1e1e5cd commit 70194be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/packages/snap/src/runner-watch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,15 @@ 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;
} else if (key.name === "q") {
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
Expand Down

0 comments on commit 70194be

Please sign in to comment.