MCPcopy
hub / github.com/air-verse/air / TestNewWatcher_PollingWatcherWhenPollEnabled

Function TestNewWatcher_PollingWatcherWhenPollEnabled

runner/watcher_test.go:20–34  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

18}
19
20func TestNewWatcher_PollingWatcherWhenPollEnabled(t *testing.T) {
21 t.Parallel()
22
23 cfg := defaultConfig()
24 cfg.Build.Poll = true
25 cfg.Build.PollInterval = 1000
26
27 w, err := newWatcher(&cfg)
28 if err != nil {
29 t.Fatalf("newWatcher() error = %v", err)
30 }
31 if w == nil {
32 t.Fatal("newWatcher() returned nil watcher")
33 }
34}
35
36func TestNewWatcher_PollIntervalHasMinimum500ms(t *testing.T) {
37 t.Parallel()

Callers

nothing calls this directly

Calls 2

defaultConfigFunction · 0.85
newWatcherFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…