GithubHelp home page GithubHelp logo

Comments (10)

benjamine avatar benjamine commented on June 9, 2024 3

maybe expect(foo).to.contain.matchingElement(bar) ? (following the dot-notation style of other assertions like have)

from chai-enzyme.

vesln avatar vesln commented on June 9, 2024 1

sweet.

any suggestions for the dsl? .loose.equal() and .loose.contain() is one option

from chai-enzyme.

ayrton avatar ayrton commented on June 9, 2024 1

From reading the documentation

@lelandrichardson @ljharb what are your thoughts on the loose for the dsl?

from chai-enzyme.

ayrton avatar ayrton commented on June 9, 2024 1

@Drasky-Vanderhoff no work has been started as far as I know, I also don't have a timeline as to when someone will start working on this

from chai-enzyme.

LeopoldoFu avatar LeopoldoFu commented on June 9, 2024

Seems like it is matchesElement and containsMatchingElement now.

So how about .matchesElement() and .containsMatchingElement()?

from chai-enzyme.

ljharb avatar ljharb commented on June 9, 2024

It seems like it'd be simplier to do expect(foo).to.matchElement(bar) and expect(foo).to.containMatchingElement(bar).

from chai-enzyme.

sherwinyu avatar sherwinyu commented on June 9, 2024

This would be great! If no one is working on it, I may try to take a stab at it this weekend -- came looking for this feature and found this existing issue.

from chai-enzyme.

ayrton avatar ayrton commented on June 9, 2024

@sherwinyu feel free to start an implementation, this is def. something we will accept as a PR. I currently like @benjamine's suggestion the most

from chai-enzyme.

Drasky-Vanderhoff avatar Drasky-Vanderhoff commented on June 9, 2024

I'm new to enzyme and i just found that really want to use containMatchingElement in order to avoid restriction of getting exactly the same tag with all attributes in order to match with the one i expecting. Glad that you are considering this feature, is there any idea of when this will be implemented or someone is actually working on it ? Thanks!

from chai-enzyme.

wKich avatar wKich commented on June 9, 2024

Hi. Is the matchesElement supported? I don't see implementation in PR.

from chai-enzyme.

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.