Package Exports
- @apitree.cz/testing-library
- @apitree.cz/testing-library/setup
Readme
Installation
pnpm add --save-dev @apitree.cz/testing-library @apitree.cz/vitest-config vitest
Usage
Create
vitest.config.ts
in your project root:export { config as default } from '@apitree.cz/vitest-config/react';
Create
tests/setup.ts
:import '@apitree.cz/testing-library/setup';
Create test renderers in
tests/testing-library.ts
import { createRenderers } from '@apitree.cz/testing-library'; export * from '@apitree.cz/testing-library'; export const { render, renderHook } = createRenderers();
See
CreateRenderersProps
forcreateRenderers
props reference.Write your tests in
tests
directory and run them withvitest --run
command.Use
tests/testing-library.ts
for importing Testing Library utilities.