requireFieldValue asserts that a SinkEntry contains a field with the given name and value.
(t *testing.T, entry slog.SinkEntry, name string, expected interface{})
| 3063 | // requireFieldValue asserts that a SinkEntry contains a field with |
| 3064 | // the given name and value. |
| 3065 | func requireFieldValue(t *testing.T, entry slog.SinkEntry, name string, expected interface{}) { |
| 3066 | t.Helper() |
| 3067 | for _, f := range entry.Fields { |
| 3068 | if f.Name == name { |
| 3069 | require.Equal(t, expected, f.Value, "field %q value mismatch", name) |
| 3070 | return |
| 3071 | } |
| 3072 | } |
| 3073 | t.Fatalf("field %q not found in log entry", name) |
| 3074 | } |
| 3075 | |
| 3076 | func TestSkillsFromParts(t *testing.T) { |
| 3077 | t.Parallel() |
no test coverage detected