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

Function TestSlashCommandCodemod_NoOnField

pkg/cli/codemod_slash_command_test.go:132–153  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

130}
131
132func TestSlashCommandCodemod_NoOnField(t *testing.T) {
133 codemod := getCommandToSlashCommandCodemod()
134
135 content := `---
136permissions:
137 contents: read
138---
139
140# Test`
141
142 frontmatter := map[string]any{
143 "permissions": map[string]any{
144 "contents": "read",
145 },
146 }
147
148 result, applied, err := codemod.Apply(content, frontmatter)
149
150 require.NoError(t, err)
151 assert.False(t, applied)
152 assert.Equal(t, content, result)
153}
154
155func TestSlashCommandCodemod_PreservesMarkdown(t *testing.T) {
156 codemod := getCommandToSlashCommandCodemod()

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected