import type { ReactiveMap } from 'brisa';
/**
* render - Brisa Test API
*
* Render a JSX element, a string or a Response object into a container.
*
* Example:
*
* ```tsx
* import { render } from "brisa";
*
* const { container, unmount } = await render(
Hello World
);
* ```
*
* - [Brisa docs](https://brisa.build/building-your-application/testing/test-api#render)
*/
export function render(
/**
* The element to render, can be a JSX element, a string or a Response object.
*
* Example with JSX element:
*
* ```tsx
* import { render } from "brisa";
*
* const { container, unmount } = await render(
Hello World
);
* ```
*
* Example with string:
*
* ```tsx
* import { render, serveRoute } from "brisa";
*
* const response = await serveRoute("/path");
* const { container, unmount } = await render(await response.text());
* ```
*
* Example with Response object:
*
* ```tsx
* import { render, serveRoute } from "brisa";
*
* const response = await serveRoute("/path");
* const { container, unmount } = await render(response);
* ```
*/
element: JSX.Element | Response | string,
options?: {
/**
* The base element to append the container.
*
* Default: `document.documentElement`
*/
baseElement?: HTMLElement;
/**
* The i18n locale to use in the rendering.
*
* Default is the `defaultLocale`.
*/
locale?: string;
},
): Promise<{ container: HTMLElement; unmount: () => void; store: ReactiveMap }>;
/**
* serveRoute - Brisa Test API
*
* Serve a route and return the response.
*
* Example:
*
* ```tsx
* import { serveRoute } from "brisa";
*
* const response = await serveRoute("/path");
* ```
*
* - [Brisa docs](https://brisa.build/building-your-application/testing/test-api#serveroute)
*/
export function serveRoute(route: string): Promise;
/**
* waitFor - Brisa Test API
*
* Wait for an "expect" assertion to pass.
*
* Example:
*
* ```tsx
* import { waitFor } from "brisa";
*
* await waitFor(() => expect(document.querySelector("button")).not.toBeNull());
* ```
*
* > Note: The maxMilliseconds parameter is the maximum time to wait for the assertion to pass. By default, it is 1000 milliseconds.
*
* - [Brisa docs](https://brisa.build/building-your-application/testing/test-api#waitfor)
*/
export function waitFor(
fn: () => unknown,
maxMilliseconds: number,
): Promise;
/**
* debug - Brisa Test API
*
* Log the current HTML of the DOM into the console on a pretty format.
*
* Example:
*
* ```tsx
* import { debug, render } from "brisa";
*
* await render(
Hello World
);
* debug();
* ```
*
* Also you can pass an element to debug:
*
* ```tsx
* import { debug, render } from "brisa";
*
* await render(
Hello World
);
* debug(document.querySelector("div"));
* ```
*
* In the console you will see:
*
* ```html
*
*
*
*
*