MCPcopy
hub / github.com/huntabyte/bits-ui / setup

Function setup

tests/src/tests/command/command.browser.test.ts:11–23  ·  view source on GitHub ↗
(props: Partial<ComponentProps<typeof CommandTest>> = {})

Source from the content-addressed store, hash-verified

9const kbd = getTestKbd();
10
11function setup(props: Partial<ComponentProps<typeof CommandTest>> = {}) {
12 // oxlint-disable-next-line no-explicit-any
13 const returned = render(CommandTest, props as any);
14 const input = page.getByTestId("input");
15 const root = page.getByTestId("root");
16 const list = page.getByTestId("list");
17 return {
18 ...returned,
19 root,
20 input,
21 list,
22 };
23}
24
25it("should select the first item by default", async () => {
26 setup();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…