@pie-ui/categorize

1.5.10 • Public • Published

test-utils

test-utils is a small collection of tools and helper functions that facilitate testing for components of the PIE framework.

Usage

Install

npm install --save @pie-lib/test-utils

Import

import { shallowChild } from '@pie-lib/test-utils';

Use it for testing HoC wrapped components

const wrapper = shallowChild(ComponentX, defaultProps, 1); // 1 being nest level, for instance Material-UI styles wrapper HoC
const componentWithSpecificProps = wrapper(specificProps);

expect(componentWithSpecificProps.find('div').length).toEqual(1);

Readme

Keywords

none

Package Sidebar

Install

npm i @pie-ui/categorize

Weekly Downloads

2

Version

1.5.10

License

ISC

Unpacked Size

278 kB

Total Files

50

Last publish

Collaborators

  • iacoshoria
  • andreeapescar
  • chillenious
  • ed.eustace
  • elodszopos
  • lakatosandrei
  • evaneus