0.3.0 • Published 11 months ago

@apitree.cz/testing-library v0.3.0

Weekly downloads
-
License
-
Repository
github
Last release
11 months ago

Testing Library

React Testing Library setup for Vitest in ApiTree projects.

Installation

pnpm add --save-dev @apitree.cz/testing-library @testing-library/react vitest

Usage

  1. Setup Vitest for React with @apitree.cz/vitest-config.

  2. Create tests/setup.ts:

    import '@apitree.cz/testing-library/setup';
  3. Create test renderers in tests/testing-library.ts

    import { createRenderers } from '@apitree.cz/testing-library';
    
    export * from '@apitree.cz/testing-library';
    export * from '@testing-library/react';
    export const { render, renderHook } = createRenderers();

    See CreateRenderersProps for createRenderers props reference.

  4. Write your tests in tests directory and run them with vitest --run command.

    Use tests/testing-library.ts for importing Testing Library utilities.

0.3.0

11 months ago

0.2.7

1 year ago

0.2.8

1 year ago

0.2.6

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.1

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.0

2 years ago

0.1.0

2 years ago