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 vitestUsage
Create
vitest.config.tsin 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.tsimport { createRenderers } from '@apitree.cz/testing-library'; export * from '@apitree.cz/testing-library'; export const { render, renderHook } = createRenderers();
See
CreateRenderersPropsforcreateRenderersprops reference.Write your tests in
testsdirectory and run them withvitest --runcommand.Use
tests/testing-library.tsfor importing Testing Library utilities.