GithubHelp home page GithubHelp logo

include/string/contain doc errors about chai HOT 5 CLOSED

chaijs avatar chaijs commented on May 4, 2024
include/string/contain doc errors

from chai.

Comments (5)

logicalparadox avatar logicalparadox commented on May 4, 2024

One thing to note is that keys behaves differently depending on the modifier..

expect({ foo: 1, bar: 2 }).to.have.keys('foo', 'bar'); // this is strict; all or nothing
expect({ foo: 1, bar: 2 }).to.contain.keys('foo'); // this is inclusion

This is achieved through this.contains, which can be seen triggered here and used here.

Provided that the strict/inclusion feature for keys is not lost, I have no objections. Also, if you would be so kind to include some tests, that would be awesome :)

from chai.

logicalparadox avatar logicalparadox commented on May 4, 2024

I fixed the small typos for the docs.

Is the second part, the feature request, something that you have had a chance to look into? It not, I'll slate it for 0.4.x.

from chai.

jfirebaugh avatar jfirebaugh commented on May 4, 2024

I ended up using similar ideas in chai-jquery, but haven't had time to do it for chai itself. Feel free to put it on the back burner.

from chai.

logicalparadox avatar logicalparadox commented on May 4, 2024

i like the idea so im going to leave this open so it doesn't fall into the abyss of closed tickets

from chai.

logicalparadox avatar logicalparadox commented on May 4, 2024

This has been implemented in the 0.6.x branch and will be in the next release :)

/cc @vesln

from chai.

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.