weixin_39555579 2020-11-30 13:44
浏览 0

Events emitted for paths that don't match the pattern

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

  • 写回答

5条回答 默认 最新

  • weixin_39555579 2020-11-30 13:44
    关注

    I'm not sure what the original intent was, but it looks like add events were only supposed to be emitted for matching paths. If that's right, then let me know if 623b07a7afca02ae34ec17a4b404121072efea1a looks like it's going in the right direction.

    If this looks like the right sort of change, I can update the tests. I'd like to run them individually to isolate issues, but #71 is at play as well.

    评论

报告相同问题?