Skip to content

Move testHook to its own pacakge #302

@kentcdodds

Description

@kentcdodds
Member

It seems to be causing a lot of confusion for people and we definitely don't want application developers using it to "unit test" their hooks. Putting it into another package would make it easier for us to call out its true purpose and reduce the chance of misuse.

Thoughts?

Activity

donavon

donavon commented on Feb 16, 2019

@donavon
Contributor

I'm all for this

https://twitter.com/donavon/status/1096061809499561984

react-hooks-testing-library?

kentcdodds

kentcdodds commented on Feb 16, 2019

@kentcdodds
MemberAuthor

You make it, and I'll make this happen

ooade

ooade commented on Feb 16, 2019

@ooade

Yeah 🤸

donavon

donavon commented on Feb 16, 2019

@donavon
Contributor

I have some family obligations today, but will get on this as soon as I can. But go out and grab the npm name

kentcdodds

kentcdodds commented on Feb 16, 2019

@kentcdodds
MemberAuthor

Oh cool! Could you give it a look and open an issue for anything that's lacking/different and see if the maintainer is interested in doing/accepting what we need?

alexkrolick

alexkrolick commented on Feb 16, 2019

@alexkrolick
Collaborator

Putting it into another package would make it easier for us to call out its true purpose and reduce the chance of misuse.

Well, we also pulled a Webpack and released with no docs. I think this is pretty prominently explained in the docs PR for testHook: testing-library/testing-library-docs#32

The linked package seems pretty close in API - I'll file an issue since you both are indisposed.

mpeyper

mpeyper commented on Feb 17, 2019

@mpeyper
Member

Hey, author of react-hooks-testing-library here.

I started out with a "what would react-testing-library do" mentality so I'm not surprised that API is pretty close.

As I said in the other issue, it started out as a proof-of-concept from my perspective and I only updated it recently to match the stable hooks API in case anyone was actually using it. I've had a few thoughts on how the API could be improved, but nothing nailed down. I'm more than happy to accept PRs bringing it inline with any features offered by testHook (at a quick glance it's pretty much on par), or even for large breaking changes.

mpeyper

mpeyper commented on Feb 21, 2019

@mpeyper
Member

Just wanted to let you all know that I have published a testHook compatible version of react-hooks-testing-library (v0.3.2 is the current version in NPM).

kentcdodds

kentcdodds commented on Feb 24, 2019

@kentcdodds
MemberAuthor

Awesome. I think we're ready to make this happen. Anyone want to make the PR too remove testHook?

schettino

schettino commented on Feb 24, 2019

@schettino
Contributor

I can handle this. :)

26 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @donavon@danielkcz@kentcdodds@alexkrolick@smmoosavi

        Issue actions

          Move testHook to its own pacakge · Issue #302 · testing-library/react-testing-library