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

Function TestScheduleCodemod_StandardCron_NoChange

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

Source from the content-addressed store, hash-verified

154}
155
156func TestScheduleCodemod_StandardCron_NoChange(t *testing.T) {
157 codemod := getScheduleAtToAroundCodemod()
158
159 content := `---
160on:
161 schedule:
162 - cron: "0 9 * * *"
163---
164
165# Test`
166
167 frontmatter := map[string]any{
168 "on": map[string]any{
169 "schedule": []any{
170 map[string]any{"cron": "0 9 * * *"},
171 },
172 },
173 }
174
175 result, applied, err := codemod.Apply(content, frontmatter)
176
177 require.NoError(t, err)
178 assert.False(t, applied)
179 assert.Equal(t, content, result)
180}
181
182func TestScheduleCodemod_PreservesIndentation(t *testing.T) {
183 codemod := getScheduleAtToAroundCodemod()

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected