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

Function TestScheduleCodemod_PreservesMarkdown

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

Source from the content-addressed store, hash-verified

261}
262
263func TestScheduleCodemod_PreservesMarkdown(t *testing.T) {
264 codemod := getScheduleAtToAroundCodemod()
265
266 content := `---
267on:
268 schedule:
269 - cron: daily at 09:00
270---
271
272# Test Workflow
273
274Runs on a schedule.`
275
276 frontmatter := map[string]any{
277 "on": map[string]any{
278 "schedule": []any{
279 map[string]any{"cron": "daily at 09:00"},
280 },
281 },
282 }
283
284 result, applied, err := codemod.Apply(content, frontmatter)
285
286 require.NoError(t, err)
287 assert.True(t, applied)
288 assert.Contains(t, result, "# Test Workflow")
289 assert.Contains(t, result, "Runs on a schedule.")
290}

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected