Skip to content

[Docs] Testing Recipes: broken test code  #2386

Description

@brianthompson-daugherty

Hi, I think there's a little bug in the example code in the Testing Recipes section.

https://reactjs.org/docs/testing-recipes.html#events

When I copy the code for toggle.js and toggle.test.js into a fresh sample project and run npm run test, I get a failed test.

It looks like the expectations are backwards vs. the initial state in the toggle component.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions