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

Function TestScheduleCodemod_ScheduleField

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

Source from the content-addressed store, hash-verified

235}
236
237func TestScheduleCodemod_ScheduleField(t *testing.T) {
238 codemod := getScheduleAtToAroundCodemod()
239
240 content := `---
241on:
242 schedule:
243 - schedule: daily at 09:00
244---
245
246# Test`
247
248 frontmatter := map[string]any{
249 "on": map[string]any{
250 "schedule": []any{
251 map[string]any{"schedule": "daily at 09:00"},
252 },
253 },
254 }
255
256 result, applied, err := codemod.Apply(content, frontmatter)
257
258 require.NoError(t, err)
259 assert.True(t, applied)
260 assert.Contains(t, result, "schedule: daily around 09:00")
261}
262
263func TestScheduleCodemod_PreservesMarkdown(t *testing.T) {
264 codemod := getScheduleAtToAroundCodemod()

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected