inGroup("G", inGroup("H", hasAttr("e", "f"))),
},
},
+ {
+ explanation: withSource("a Handler should not output groups for an empty Record"),
+ f: func(l *slog.Logger) {
+ l.With("a", "b").WithGroup("G").With("c", "d").WithGroup("H").Info("msg")
+ },
+ checks: []check{
+ hasKey(slog.TimeKey),
+ hasKey(slog.LevelKey),
+ hasAttr(slog.MessageKey, "msg"),
+ hasAttr("a", "b"),
+ inGroup("G", hasAttr("c", "d")),
+ inGroup("G", missingKey("H")),
+ },
+ },
{
explanation: withSource("a Handler should call Resolve on attribute values"),
f: func(l *slog.Logger) {