-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_desktop_test.go
More file actions
20 lines (17 loc) · 882 Bytes
/
Copy pathmain_desktop_test.go
File metadata and controls
20 lines (17 loc) · 882 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//go:build !nogui
package main
import "testing"
// macOS must quit when the last window closes, matching the Wails default
// on Linux/Windows. The framework defaults this to FALSE on macOS; without
// the override, closing the window leaves a headless backend (transport
// server, SQLite handle, provider subprocesses) running with no tray, menu,
// or reopenable window — ServiceShutdown never fires until Force Quit.
func TestDesktopApplicationOptionsQuitOnLastWindowClosed(t *testing.T) {
opts := desktopApplicationOptions("Agent Overflow")
if !opts.Mac.ApplicationShouldTerminateAfterLastWindowClosed {
t.Fatal("Mac.ApplicationShouldTerminateAfterLastWindowClosed must be true: closing the last window on macOS would otherwise leave a zombie headless backend")
}
if opts.Name != "Agent Overflow" {
t.Fatalf("Name = %q, want %q", opts.Name, "Agent Overflow")
}
}