notifytest

package
v0.3.28 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package notifytest holds the notification helpers the shell's tests share: a service and a store on temporary files, and the history, the store and the popup list read back as pages and id sets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func History

History is the first page of svc's history, newest first.

func IDs

func IDs(notifs []*notifications.Notification) map[uint32]bool

IDs is the set of the notifications' ids.

func NewService added in v0.3.23

func NewService(tb testing.TB) *notifications.Service

NewService is a service whose do-not-disturb state is a temporary directory's: it starts off, and the writes the service queued have landed before the directory goes.

Types

type Store added in v0.3.14

type Store struct {
	// contains filtered or unexported fields
}

Store is a service's store as a test reads it back: through the service, whose writes reach the disk after its calls return.

func AttachStore

func AttachStore(t *testing.T, svc *notifications.Service) Store

AttachStore persists svc's history in a store on a temporary file, closed once the writes queued when the test ends have landed; call it before the first notification.

func (Store) Stored added in v0.3.14

func (s Store) Stored(t *testing.T) []*notifications.Notification

Stored is the first page of what the store holds once every write the service queued so far has landed, newest first.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL