Giter Site home page Giter Site logo

Comments (8)

kentcdodds avatar kentcdodds commented on May 26, 2024 1

peer would be the proper way to handle this

from jest-dom.

gnapse avatar gnapse commented on May 26, 2024

I would be open to this. Sounds good.

Hopefully someone can take it to contribute this new feature before I or other maintainer do it, which may take a while.

from jest-dom.

benquarmby avatar benquarmby commented on May 26, 2024

Hopefully someone can take it to contribute this new feature before I or other maintainer do it, which may take a while.

I'm willing to make a contribution. My biggest concern is what I mentioned in the drawbacks section. These assertions would require a dependency on @testing-library/dom. Would you be open to having that as a production or peer dependency?

from jest-dom.

gnapse avatar gnapse commented on May 26, 2024

Hmmm, good point.

@testing-library/core-maintainers thoughts?

from jest-dom.

benquarmby avatar benquarmby commented on May 26, 2024

peer would be the proper way to handle this

Agreed. That's the way my local test implementation works.

We can assume most consumers of @testing-library/jest-dom probably already have some version of @testing-library/dom. That said, adding a new peer dependency is technically a breaking change; The new assertions will break without it.

I can get started on a PR if everyone is OK with:

  • adding a peer dependency.
  • accepting a breaking change.

from jest-dom.

gnapse avatar gnapse commented on May 26, 2024

I'm ok with that. But let's give it a day or two, to see what others have to say.

from jest-dom.

gnapse avatar gnapse commented on May 26, 2024

@benquarmby I say go for it.

from jest-dom.

benquarmby avatar benquarmby commented on May 26, 2024

Made some progress here: main...benquarmby:jest-dom:jest-dom-query

Please ignore the VSCode settings. They're just for my personal convenience and will be removed. Still a way to go before it's ready for review.

from jest-dom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.