(t *testing.T)
| 73 | } |
| 74 | |
| 75 | func TestMCPScriptsModeCodemod_NoModeField(t *testing.T) { |
| 76 | codemod := getMCPScriptsModeCodemod() |
| 77 | |
| 78 | content := `--- |
| 79 | on: workflow_dispatch |
| 80 | mcp-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 | |
| 100 | func TestMCPScriptsModeCodemod_PreservesIndentation(t *testing.T) { |
| 101 | codemod := getMCPScriptsModeCodemod() |
nothing calls this directly
no test coverage detected