Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#610] waitForElementToBeRemoved: fix return type #631

Commits on Jun 13, 2020

  1. [testing-library#610] waitForElementToBeRemoved: fix return type

    There's a couple options here, as issue testing-library#610 enumerates nicely.
    
    1) Resolve to the type param T
    
    Keeping references to removed elements is a probable source of bugs and
    confusing tests. A reference should be easy enough to obtain with other
    test utilities; I submit that there's no added value in providing it
    here.
    
    2) Resolve to boolean (or literal `true`)
    
    Not a bad choice by any means, but not particularly meaningful (the
    fulfillment of the promise is signal enough IMO)
    
    3) Resolve to something empty
    This is what I've gone with. We are _literally_ waiting for removal,
    after all :)
    
    Fixes testing-library#610
    tjefferson08 committed Jun 13, 2020
    Configuration menu
    Copy the full SHA
    6f3ea3d View commit details
    Browse the repository at this point in the history