(t *testing.T)
| 1996 | } |
| 1997 | |
| 1998 | func TestLoadPhaseOrder_UsesIDWhenPresent(t *testing.T) { |
| 1999 | viper.Set("phases", []any{ |
| 2000 | map[string]any{"id": "core-cli", "name": "Core CLI"}, |
| 2001 | map[string]any{"id": "web-ui", "name": "Web UI"}, |
| 2002 | }) |
| 2003 | defer viper.Set("phases", nil) |
| 2004 | |
| 2005 | got := loadPhaseOrder() |
| 2006 | want := []string{"core-cli", "web-ui"} |
| 2007 | if len(got) != len(want) { |
| 2008 | t.Fatalf("loadPhaseOrder() = %v, want %v", got, want) |
| 2009 | } |
| 2010 | for i := range want { |
| 2011 | if got[i] != want[i] { |
| 2012 | t.Errorf("loadPhaseOrder()[%d] = %q, want %q", i, got[i], want[i]) |
| 2013 | } |
| 2014 | } |
| 2015 | } |
| 2016 | |
| 2017 | func TestLoadPhaseOrder_SkipsPhasesWithoutID(t *testing.T) { |
| 2018 | viper.Set("phases", []any{ |
nothing calls this directly
no test coverage detected