(t *testing.T)
| 130 | } |
| 131 | |
| 132 | func TestSlashCommandCodemod_NoOnField(t *testing.T) { |
| 133 | codemod := getCommandToSlashCommandCodemod() |
| 134 | |
| 135 | content := `--- |
| 136 | permissions: |
| 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 | |
| 155 | func TestSlashCommandCodemod_PreservesMarkdown(t *testing.T) { |
| 156 | codemod := getCommandToSlashCommandCodemod() |
nothing calls this directly
no test coverage detected