Git Product home page Git Product logo

chai-properties's People

Contributors

amilajack avatar curtishumphrey avatar irnc avatar josmardias avatar peterdavehello avatar qraynaud avatar stormslowly avatar vbardales avatar wbyoung avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chai-properties's Issues

Implement strict sub-object checking

Hi,

Thanks for this very nice chai plugin! IMHO, this functionality so useful, it should be integrated into the chai proper.

But here is the issue I've ran into this issue when using it. Currently, if the object under test has a property X that is itself an object, the assertion will only check that properties of expected.X are a subset of properties in actual.X. This may be dangerous as the users may be expecting the full comparison, and be missing hidden problems such as this one:

chai.expect({permissions: {limited: true, admin: true}})
  .to.have.properties({permissions: {limited: true}});

It would be nice to perform full equality rather than the subset check on the members of the expected properties, either by default or as a selectable option.
Thanks!

chai-properties uses older version of lodash that has vulnerability

chai-properties module is using the lodash's older version which is having vulnerability issue.

I tried raising a PR for the same. But I don't have access to create a branch in this repo.
Can we please have this change in package.json ?

"dependencies": {
    "lodash": "~4.17.11"
  }

Register on bower

Hi, and thanks for this.
I'm just starting with chai and couldn't believe it's not in the default assertions, TBH.
If you could register your lib on bower it could be helpful.
Thanks!

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.