({ file, watchedFile })
| 153 | } |
| 154 | |
| 155 | async function failWriteSucceed({ file, watchedFile }) { |
| 156 | const child = spawn(execPath, ['--watch', '--no-warnings', file], { encoding: 'utf8', stdio: 'pipe' }); |
| 157 | let cancelRestarts = () => {}; |
| 158 | |
| 159 | try { |
| 160 | // Break the chunks into lines |
| 161 | for await (const data of createInterface({ input: child.stdout })) { |
| 162 | if (data.startsWith('Completed running')) { |
| 163 | break; |
| 164 | } |
| 165 | if (data.startsWith('Failed running')) { |
| 166 | cancelRestarts = restart(watchedFile, 'console.log("test has ran");'); |
| 167 | } |
| 168 | } |
| 169 | } finally { |
| 170 | child.kill(); |
| 171 | cancelRestarts(); |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | tmpdir.refresh(); |
| 176 |
no test coverage detected
searching dependent graphs…