( state: RunnerState, onChange: (state: RunnerState) => void, )
| 143 | } |
| 144 | |
| 145 | function subscribeFilterFile( |
| 146 | state: RunnerState, |
| 147 | onChange: (state: RunnerState) => void, |
| 148 | ) { |
| 149 | watcher.subscribe(PROJECT_ROOT, async (err, events) => { |
| 150 | if (err) { |
| 151 | console.error(err); |
| 152 | process.exit(1); |
| 153 | } else if ( |
| 154 | events.findIndex(event => event.path.includes(FILTER_FILENAME)) !== -1 |
| 155 | ) { |
| 156 | if (state.mode.filter) { |
| 157 | state.filter = await readTestFilter(); |
| 158 | state.mode.action = RunnerAction.Test; |
| 159 | onChange(state); |
| 160 | } |
| 161 | } |
| 162 | }); |
| 163 | } |
| 164 | |
| 165 | function subscribeTsc( |
| 166 | state: RunnerState, |
no test coverage detected