watchdog_test.gno
0.28 Kb ยท 16 lines
1package watchdog
2
3import (
4 "testing"
5 "time"
6
7 "gno.land/p/demo/uassert"
8)
9
10func TestPackage(t *testing.T) {
11 w := Watchdog{Duration: 5 * time.Minute}
12 uassert.False(t, w.IsAlive())
13 w.Alive()
14 uassert.True(t, w.IsAlive())
15 // XXX: add more tests when we'll be able to "skip time".
16}