diff --git a/src/index.ts b/src/index.ts index 4023c20..c600f93 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,7 +3,7 @@ import { beforeEach } from 'vitest' import { cleanup, render } from './pure' export { render, cleanup } from './pure' -export type { ComponentRenderOptions, Screen } from './pure' +export type { ComponentRenderOptions, RenderResult } from './pure' page.extend({ render, diff --git a/src/pure.ts b/src/pure.ts index f2b1453..051cdfd 100644 --- a/src/pure.ts +++ b/src/pure.ts @@ -4,7 +4,7 @@ import React from 'react' import type { Container } from 'react-dom/client' import ReactDOMClient from 'react-dom/client' -export interface Screen extends LocatorSelectors { +export interface RenderResult extends LocatorSelectors { container: HTMLElement baseElement: HTMLElement debug: ( @@ -34,7 +34,7 @@ const mountedRootEntries: { export function render( ui: React.ReactNode, { container, baseElement, wrapper: WrapperComponent }: ComponentRenderOptions = {}, -): Screen { +): RenderResult { if (!baseElement) { // default to document.body instead of documentElement to avoid output of potentially-large // head elements (such as JSS style blocks) in debug output