avajs/ava

Make watch mode wait for the file system to be idle, and have that be configurable

開放

#2,715 建立於 2021年3月13日

 (2 則留言) (3 個反應) (0 位負責人)JavaScript (1,408 個分叉)batch import
enhancementhelp wantedscope:watch-mode

倉庫指標

星標
 (20,600 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Based on discussion in https://github.com/avajs/ava/discussions/2702, projects with more complicated build setups may want to configure how long watch mode waits for the filesystem to become idle, lest it runs tests prematurely.

~We currently wait at least 100ms, but debounce for another 10ms after changes. ~Instead let's introduce a watchFsIdle option that defaults to 500ms. This should be configurable through config files only, not CLI flags. We should take time strings, like the timeout option.

Other name suggestions welcome.

The watcher should wait the duration of idle time after the last change. If another change is detected, it should again wait the duration of the idle time.

This likely impacts the current watcher tests which are rather brittle. We also have some integration tests that may be affected.

貢獻者指南