MCPcopy Create free account
hub / github.com/bvaughn/react-resizable-panels / expectLayout

Function expectLayout

integrations/tests/src/utils/expectLayout.ts:4–26  ·  view source on GitHub ↗
({
  layout,
  mainPage,
  onLayoutChangeCount,
  onLayoutChangedCount
}: {
  layout: Layout;
  mainPage: Page;
  onLayoutChangeCount: number;
  onLayoutChangedCount: number;
})

Source from the content-addressed store, hash-verified

2import type { Layout } from "react-resizable-panels";
3
4export async function expectLayout({
5 layout,
6 mainPage,
7 onLayoutChangeCount,
8 onLayoutChangedCount
9}: {
10 layout: Layout;
11 mainPage: Page;
12 onLayoutChangeCount: number;
13 onLayoutChangedCount: number;
14}) {
15 await expect(mainPage.getByText('"layout"')).toHaveText(
16 JSON.stringify(
17 {
18 layout,
19 onLayoutChangeCount,
20 onLayoutChangedCount
21 },
22 null,
23 2
24 )
25 );
26}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected