TestSpec_Functions_LoadObjectiveMappingFromConfig validates that, absent any environment or config-file override, LoadObjectiveMappingFromConfig falls back to the built-in defaults (precedence step 3 in the README). This test deliberately does not set OBJECTIVE_MAPPING_JSON; in the absence of a rep
(t *testing.T)
| 270 | // This test deliberately does not set OBJECTIVE_MAPPING_JSON; in the absence of |
| 271 | // a repository .github/objective-mapping.json it must return the defaults. |
| 272 | func TestSpec_ConfigPrecedence_DefaultFallback(t *testing.T) { |
| 273 | t.Setenv("OBJECTIVE_MAPPING_JSON", "") |
| 274 | |
| 275 | om := github.LoadObjectiveMappingFromConfig() |
| 276 | require.NotNil(t, om, "LoadObjectiveMappingFromConfig should never return nil") |
| 277 | assert.Equal(t, github.MultiLabelLogicMax, om.MultiLabelLogic, |
| 278 | "the default fallback mapping should use \"max\" logic") |
| 279 | } |
| 280 | |
| 281 | // SPEC_MISMATCH: The README "Usage Examples" section illustrates |
| 282 | // ComputeObjectiveValue([]string{"bug","high-priority"}) == 60 and |
nothing calls this directly
no test coverage detected