testutils

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertGoldenJournals

func AssertGoldenJournals(t *testing.T, graph *logseq.Graph, caseDirName string, pages []string)

func AssertGoldenPages

func AssertGoldenPages(t *testing.T, graph *logseq.Graph, caseDirName string, pages []string)

func AssertPagesDontExist

func AssertPagesDontExist(t *testing.T, graph *logseq.Graph, pages []string)

func CaptureOutput

func CaptureOutput(function func()) string

CaptureOutput captures both stdout and stderr. It also works with the "color" package.

func RelativeTime

func RelativeTime() time.Time

func StubBacklog

func StubBacklog(t *testing.T, configPage, caseDirName string, apiResponses *StubAPIResponses) backlog.Backlog

func StubGraph

func StubGraph(t *testing.T, caseDirName string) *logseq.Graph

StubGraph opens the example graph under "testdata" for testing.

Types

type QueryArg

type QueryArg struct {
	Contains string
}

type StubAPIResponses

type StubAPIResponses struct {
	Queries []QueryArg
}

Jump to

Keyboard shortcuts

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