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

Function TestScheduleCodemod_WeeklyOnAt

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

Source from the content-addressed store, hash-verified

47}
48
49func TestScheduleCodemod_WeeklyOnAt(t *testing.T) {
50 codemod := getScheduleAtToAroundCodemod()
51
52 content := `---
53on:
54 schedule:
55 - cron: weekly on Monday at 10:00
56---
57
58# Test`
59
60 frontmatter := map[string]any{
61 "on": map[string]any{
62 "schedule": []any{
63 map[string]any{"cron": "weekly on Monday at 10:00"},
64 },
65 },
66 }
67
68 result, applied, err := codemod.Apply(content, frontmatter)
69
70 require.NoError(t, err)
71 assert.True(t, applied)
72 assert.Contains(t, result, "weekly on Monday around 10:00")
73 assert.NotContains(t, result, "weekly on Monday at 10:00")
74}
75
76func TestScheduleCodemod_MonthlyOn(t *testing.T) {
77 codemod := getScheduleAtToAroundCodemod()

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected