MCPcopy Create free account
hub / github.com/emwalker/digraph / setup

Function setup

client/src/components/TopicPage/ViewTopicPage/index.test.tsx:85–96  ·  view source on GitHub ↗
(
  configureMocks: (environment: MockEnvironment, options?: Options) => () => void,
  options?: Options,
)

Source from the content-addressed store, hash-verified

83}
84
85async function setup(
86 configureMocks: (environment: MockEnvironment, options?: Options) => () => void,
87 options?: Options,
88) {
89 const { environment, user } = renderWithUser(<TestRenderer />)
90 expect(screen.getByText('Loading...')).toBeInTheDocument()
91 await waitFor(configureMocks(environment, options))
92 await waitFor(() => {
93 expect(screen.queryByText('Loading...')).not.toBeInTheDocument()
94 })
95 return { environment, user }
96}
97
98function makeMocks(environment: MockEnvironment, options?: Options) {
99 const repoIds = options?.repoIds || ['wiki-repo-id']

Callers 1

index.test.tsxFile · 0.70

Calls 1

renderWithUserFunction · 0.90

Tested by

no test coverage detected