MCPcopy Create free account
hub / github.com/github/gh-aw / TestScheduleCodemod_DailyAt

Function TestScheduleCodemod_DailyAt

pkg/cli/codemod_schedule_test.go:22–47  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

20}
21
22func TestScheduleCodemod_DailyAt(t *testing.T) {
23 codemod := getScheduleAtToAroundCodemod()
24
25 content := `---
26on:
27 schedule:
28 - cron: daily at 09:00
29---
30
31# Test`
32
33 frontmatter := map[string]any{
34 "on": map[string]any{
35 "schedule": []any{
36 map[string]any{"cron": "daily at 09:00"},
37 },
38 },
39 }
40
41 result, applied, err := codemod.Apply(content, frontmatter)
42
43 require.NoError(t, err)
44 assert.True(t, applied)
45 assert.Contains(t, result, "daily around 09:00")
46 assert.NotContains(t, result, "daily at 09:00")
47}
48
49func TestScheduleCodemod_WeeklyOnAt(t *testing.T) {
50 codemod := getScheduleAtToAroundCodemod()

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected