testing-library / testing-library/react-testing-library

use rerender props in wrapper

Open
#1,284 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
19.7k
Forks
1.2k
Avg merge
3d 16h
Merged PRs (30d)
1

Description

Describe the feature you'd like:

I would like to be able to test a re-render with a different wrapper.
The use case is to ensure that returned callbacks of the tested hook are changed when a new wrapper is used.

Mimic what was added in the testing-library/react-hooks-testing-library in https://github.com/testing-library/react-hooks-testing-library/pull/381

Additionally, update the types of wrapper.

Suggested implementation:

I can't manage to modify pure.js to convey this.

Describe alternatives you've considered:

Teachability, Documentation, Adoption, Migration Strategy:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the referenced react-hooks-testing-library pull request, then inspect pure.js and the existing wrapper type definitions. The change is complete when a rerender can use a different wrapper and returned hook callbacks update accordingly, with the wrapper types reflecting the supported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.