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

The documentation is quite outdated #488

Closed
astorije opened this issue Jul 17, 2015 · 6 comments
Closed

The documentation is quite outdated #488

astorije opened this issue Jul 17, 2015 · 6 comments

Comments

@astorije
Copy link
Member

Chai's website still mentions version 2.1.0 while you just released version 3.1.0.

An up-to-date documentation would have prevented me to add and remove features to my plugin but granted, this is personal and half my fault :-)

On a more general note, since Chai changed its major version, I think it really should document the breaking changes on the main website. A nice summary of the breaking changes would make me more comfortable switching some big projects to version 3 :-)

@keithamus
Copy link
Member

Aww about that @astorije.

I'm painfully aware of how outdated the docs are. The intent is to move to using github pages using jekyll, which I've put some time towards. Moving it to github pages will automate the deployment of the doc website, whereas right now it is a manual process and one that @logicalparadox has to do.

We have some issues about this - primarily chaijs/chaijs.github.io#74 and chaijs/chaijs.github.io#34. If you'd like to go over to those and add your input, or if you have any time to help out with code - that'd be much appreciated 😄.

I'll close this, as it is effectively part of the above 2 issues.

@astorije
Copy link
Member Author

I completely understand this and wish you all the luck with the 2 issues you mentioned (I won't be able to get involved, sorry), but since we reached a breaking-changing version, I'd suggest @logicalparadox runs his manual process one more time. I don't know the details and maybe he can't right now, I am just giving my 2 cents as a user :-)

@cloudbring
Copy link

Speaking of outdated documentation, I just wasted half an hour debugging why chai wouldn't work and it turns out that somewhere along the way, someone capitalized the should() function.

var chai = require('chai');
var should = chai.should; // Doesn't work throws an Error
var should = chai.should(); // Returns an object but, not the function you need to make your tests work
var should = chai.Should(); // Is what you want but, is nowhere in the documentation

I had to find this in the tests for Chai itself. I know this is open source and a labor of love but, please update the docs. It's super frustrating to bang my head against the wall when everything says just use chai.should().

@keithamus
Copy link
Member

@cloudbring I'm not sure exactly what you're issue is - but chai.should() is mentioned on the chai homepage, and in the should guide. This hasn't changed between 2.1.0 and 3.1.0. If you feel documentation is missing around this, please feel free to send a PR. The site is open source, and available in chaijs/chai-should

@keithamus
Copy link
Member

Also @cloudbring chai.should() and chai.Should() are the same function, both should work absolutely fine. chai.Should() was introduced around 1.0.0 because chai.should() gets overridden by itself (because, of course, chai is an object and so gets "shoulded" - chai.should.be.an('object') would work). The commit for this is here. It's likely that you were experiencing this bug because you've already run chai.should() elsewhere in your code.

@cloudbring
Copy link

So, it turns out I'm using v1.1.0 (the latest compatible version with chai-json-schema) so my issue might not be applicable in the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants