testutils¶
Index¶
- Variables
- func AssertGoldenJournals(t *testing.T, graph *logseq.Graph, caseDirName string, pages []string)
- func AssertGoldenPages(t *testing.T, graph *logseq.Graph, caseDirName string, pages []string)
- func AssertPagesDontExist(t *testing.T, graph *logseq.Graph, pages []string)
- func CaptureOutput(function func()) string
- func RelativeTime() time.Time
- func StubBacklog(t *testing.T, configPage, caseDirName string, apiResponses *StubAPIResponses) backlog.Backlog
- func StubGraph(t *testing.T, caseDirName string) *logseq.Graph
- func assertGoldenContent(t *testing.T, graph *logseq.Graph, journals bool, caseDirName string, pages []string)
- func stubJSONResponse(t *testing.T, basename string) (string, error)
- type QueryArg
- type StubAPIResponses
- type mockLogseqAPI
- func newMockLogseqAPI(t *testing.T, responses StubAPIResponses) *mockLogseqAPI
- func (m *mockLogseqAPI) PostQuery(query string) (string, error)
Variables¶
func AssertGoldenJournals¶
func AssertGoldenPages¶
func AssertPagesDontExist¶
func CaptureOutput¶
CaptureOutput captures both stdout and stderr. It also works with the "color" package.
func RelativeTime¶
func StubBacklog¶
Go
func StubBacklog(t *testing.T, configPage, caseDirName string, apiResponses *StubAPIResponses) backlog.Backlog
func StubGraph¶
StubGraph opens the example graph under "testdata" for testing.
func assertGoldenContent¶
Go
func assertGoldenContent(t *testing.T, graph *logseq.Graph, journals bool, caseDirName string, pages []string)
func stubJSONResponse¶
type QueryArg¶
type StubAPIResponses¶
type mockLogseqAPI¶
func newMockLogseqAPI¶
func (*mockLogseqAPI) PostQuery¶
Generated by gomarkdoc