0.7.3 • Published 5 months ago

@apitree.cz/testing-library v0.7.3

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

Testing Library

NPM Version

React Testing Library setup for Vitest in ApiTree projects.

Installation

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

In a monorepo, install and use the package in each workspace.

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 '@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.7.2

5 months ago

0.7.1

5 months ago

0.7.3

5 months ago

0.3.1

10 months ago

0.7.0

6 months ago

0.4.0

9 months ago

0.5.0

9 months ago

0.5.1

9 months ago

0.6.3

9 months ago

0.6.2

9 months ago

0.6.4

7 months ago

0.6.1

9 months ago

0.6.0

9 months ago

0.3.0

1 year ago

0.2.7

1 year ago

0.2.8

1 year ago

0.2.6

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.1

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago