From 63ccbecde61d32764c74266104386ff7ae69b0f8 Mon Sep 17 00:00:00 2001 From: Nikita Gaziev Date: Fri, 14 Mar 2025 18:03:31 +0300 Subject: [PATCH] docs: fix render hook and render directive typos --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 44a52b9..05450b0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -137,7 +137,7 @@ function render(ui: Ui, options: Options = {}): Result { * @returns {RenderHookResult} references and tools to test the hook/primitive * * ```ts - * const { result } = render(useI18n, { wrapper: I18nProvider }); + * const { result } = renderHook(useI18n, { wrapper: I18nProvider }); * expect(result.t('test')).toBe('works'); * ``` * ### Options @@ -187,7 +187,7 @@ export function renderHook( * * ```ts * const called = vi.fn() - * const { getByText, baseContainer } = render(onClickOutside, { initialValue: called }); + * const { getByText, baseContainer } = renderDirective(onClickOutside, { initialValue: called }); * expect(called).not.toBeCalled(); * fireEvent.click(baseContainer); * expect(called).toBeCalled();