mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
fix<compiler>: only call readTestFilter if the filter option is enabled (#29720)
Following the instructions in the compiler/docs/DEVELOPMENT_GUIDE.md, we are stuck on the command `yarn snap --watch` because it calls readTestFilter even though the filter option is not enabled.
This commit is contained in:
@@ -153,8 +153,8 @@ function subscribeFilterFile(
|
||||
} else if (
|
||||
events.findIndex((event) => event.path.includes(FILTER_FILENAME)) !== -1
|
||||
) {
|
||||
state.filter = await readTestFilter();
|
||||
if (state.mode.filter) {
|
||||
state.filter = await readTestFilter();
|
||||
state.mode.action = RunnerAction.Test;
|
||||
onChange(state);
|
||||
}
|
||||
@@ -218,7 +218,7 @@ export async function makeWatchRunner(
|
||||
action: RunnerAction.Test,
|
||||
filter: filterMode,
|
||||
},
|
||||
filter: await readTestFilter(),
|
||||
filter: filterMode ? await readTestFilter() : null,
|
||||
};
|
||||
|
||||
subscribeTsc(state, onChange);
|
||||
|
||||
Reference in New Issue
Block a user