The add event is emitted for added directories, even if they don't match the provided pattern (the test added in 80271bd8010e08903d0fe4bcf2cb1746e7f30a7c asserts this behavior).
Incidentally, this causes the "finicky" addedLater test. The test does two writes, presumably to get an add event followed by a change event. However, there are two add events for the first write (one for newfolder and one for newfolder/added.js). So the test finishes before the second write, and the newfolder is created after the cleanup.
该提问来源于开源项目:shama/gaze