This commit is contained in:
Tobias Gesellchen
2026-04-19 21:59:55 +02:00
parent 5b99d7f46b
commit 56256de47b
+3 -3
View File
@@ -46,15 +46,15 @@ func TestNewWebApp(t *testing.T) {
app := NewWebApp()
// Use require-style checks that satisfy static analyzer
if app == nil { //nolint:staticcheck // false positive - NewWebApp never returns nil
if app == nil {
t.Fatal("NewWebApp returned nil")
}
if app.Devices == nil { //nolint:staticcheck // false positive - t.Fatal above stops execution
if app.Devices == nil {
t.Fatal("Devices map not initialized")
}
// At this point we know app and app.Devices are not nil
if len(app.Devices) != 0 { //nolint:staticcheck // false positive - t.Fatal above stops execution
if len(app.Devices) != 0 {
t.Errorf("Expected empty devices map, got %d devices", len(app.Devices))
}
}