(filePath, expectedCallCount)
| 214 | } |
| 215 | |
| 216 | async function assertOnChange(filePath, expectedCallCount) { |
| 217 | const promiseOnChanged = new Promise((resolve) => |
| 218 | watchAll.once('change', (f) => resolve(f)), |
| 219 | ); |
| 220 | await waitDebounce(); |
| 221 | await fs.writeFile(filePath, '<content>'); |
| 222 | assert.equal(filePath, await promiseOnChanged); |
| 223 | await waitDebounce(); |
| 224 | sinon.assert.callCount(onChange, expectedCallCount); |
| 225 | } |
| 226 | |
| 227 | // Verify foo.txt is being ignored. |
| 228 | await assertOnChange(files[0], 0); |
no test coverage detected
searching dependent graphs…