1.8.0 • Published 1 year ago

@kuzanatoliorg/testing-library-react-utils v1.8.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

The react testing library utils pack

The package provides react testing library utilities that should allow to improve test quality and effectiveness.

buildRender & buildRenderHook are builder function that allows to decrease repeated data during implementation multiple component or hook tests.

For example:

Imagine that we have component that has a few views that depends on the component's props. So instead of copy past mock date it is possible to use builder pattern. So we can use default props and options and overide only needed for each test case.

const mockData = {
  test1: "test1",
  test2: "test2",
  ...
}

const renderComponent = buildRender(mockData);

it("test case", () => {
  renderComponent({ test2: "new value" });
  ...
})
1.8.0

1 year ago

1.5.3

1 year ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago