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

Function TestMCPScriptsModeCodemod_NoModeField

pkg/cli/codemod_mcp_scripts_test.go:75–98  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

73}
74
75func TestMCPScriptsModeCodemod_NoModeField(t *testing.T) {
76 codemod := getMCPScriptsModeCodemod()
77
78 content := `---
79on: workflow_dispatch
80mcp-scripts:
81 max-size: 100KB
82---
83
84# Test`
85
86 frontmatter := map[string]any{
87 "on": "workflow_dispatch",
88 "mcp-scripts": map[string]any{
89 "max-size": "100KB",
90 },
91 }
92
93 result, applied, err := codemod.Apply(content, frontmatter)
94
95 require.NoError(t, err)
96 assert.False(t, applied)
97 assert.Equal(t, content, result)
98}
99
100func TestMCPScriptsModeCodemod_PreservesIndentation(t *testing.T) {
101 codemod := getMCPScriptsModeCodemod()

Callers

nothing calls this directly

Calls 1

getMCPScriptsModeCodemodFunction · 0.85

Tested by

no test coverage detected