MCPcopy Create free account
hub / github.com/codnect/chrono / TestNewScheduledRunnableTask

Function TestNewScheduledRunnableTask

task_test.go:31–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

29}
30
31func TestNewScheduledRunnableTask(t *testing.T) {
32 task, _ := CreateScheduledRunnableTask(0, func(ctx context.Context) {
33
34 }, time.Now(), -1, true)
35
36 assert.Equal(t, task.period, 0*time.Second)
37
38 _, err := CreateScheduledRunnableTask(0, nil, time.Now(), -1, true)
39 assert.Error(t, err)
40}
41
42func TestNewTriggerTask(t *testing.T) {
43 trigger, err := CreateCronTrigger("* * * * * *", time.Local)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected