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
  • Loading branch information
TrickyPi committed Jun 6, 2024
1 parent 704aeed commit 9066b7c
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 9066b7c

Please sign in to comment.