gitstack

grindlemire/go-tui code browser

452 B Go 22 lines 2026-03-18 · 60730a0 raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package tui

import (
	"os"
	"testing"
)

// testApp is a lightweight App used by all unit tests.
// It is created in TestMain before any tests run.
var testApp *App

func TestMain(m *testing.M) {
	testApp = &App{
		stopCh:       make(chan struct{}),
		merged:       make(chan Event, 1),
		watcherQueue: make(chan func(), 1),
		focus:        newFocusManager(),
		mounts:       newMountState(),
		batch:        newBatchContext(),
	}
	os.Exit(m.Run())
}