Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Unit Testing Behavior Driven Development with Mocha & Chai Test Suites and Test Specs (describe and it)

3 Answers

Steven Parker
Steven Parker
231,261 Points

Chai is an "expectation library" for testing. The first stage of the course covered using it by itself.

Mocha is a testing framework that allows you to organize your tests in separate files and automate the testing procedures. It is covered in this stage of the course, and you will be using it with Chai.

Andy Hu
Andy Hu
7,473 Points

Mocha is a test framework, which manages and organizes your testing process, making your life easy. Chai is an expectation library, which is a must in actual unit testing. Typically you use both of them in practice.

Andy Hu
Andy Hu
7,473 Points

Just shut up, Steven Parker. We are trying to contribute here, stop qualifying yourself.

Steven Parker
Steven Parker
231,261 Points

I don't understand what you mean by "qualifying", but just to be clear, I actively promote the contributions of all students.

It's sincerely flattering, and maybe the wording of my previous answer made it less clear than I intended, so perhaps re-wording the content of it may make it more accessible to some students.

Thank you, and happy coding!

Andy Hu
Andy Hu
7,473 Points

Well neither did I understand what you meant by "echo". Your answer wasn't perfect and I just gave my perspection on this question. Having multiple answers from different people will definitely be more helpful to the guy who asked the question. Unless you think whatever answers you give are "perfect" or "supreme". lol.

Steven Parker
Steven Parker
231,261 Points

Perfection is a process, not an achievable state. And while I try, I may not always do the best job of phrasing things in the most clear way, particularly for the benefit of those students struggling with both coding and English at the same time.

I see your point about the "echo" reference being unclear, and have removed it. It was meant as a suggestion that any original content you might wish to share would also be welcome.

And I'll try not to let the flattery go to my head! :wink:

Andy Hu
Andy Hu
7,473 Points

I knew what echo means dude. Donโ€™t understand sarcasm? And what makes you think my answer isnโ€™t original? Go ahead, you may have your opinion, but please stop commenting under my answer, I donโ€™t like you, and, if you still need it, please go to somewhere else to find your self esteem. Iโ€™ll end this meaninglessness conversation here.

Steven Parker
Steven Parker
231,261 Points

One of the several lessons forum participation has taught me is that some things don't come across as you intended very well in this format. And sarcasm is probably one of the things that is most easily misinterpreted, particularly when conveyed across cultural and/or language differences as you will encounter often here. I will leave that to your judgement, but I invite you to draw from my own experience in this regard.

I don't know what I may have done to garner your dislike, but I would welcome any opportunities to remedy it. And my self esteem was never at issue here, even before you bolstered it. Thanks again, and happy coding!

Chris Freeman
Chris Freeman
Treehouse Moderator 68,441 Points

Andy Hu, Please review the Code of Conduct and tone down the language. Phrases like "Just shut up" and "I don't like you" do not belong in the community.

Andy Hu yesterday at 6:11am [April 15, 2019 at 6:11am PDT]

Just shut up, Steven Parker. We are trying to contribute here, stop qualifying yourself.

Andy Hu yesterday at 7:14am [April 15, 2019 at 7:14am PDT]

I knew what echo means dude. Donโ€™t understand sarcasm? And what makes you think my answer isnโ€™t original? Go ahead, you may have your opinion, but please stop commenting under my answer, I donโ€™t like you, and, if you still need it, please go to somewhere else to find your self esteem. Iโ€™ll end this meaninglessness conversation here.

Steven Parker makes me think... that helps me understand WHY things are so... IF I can understand the how and why, then i feel I have truly learned something.

Thanks for making me figure out answers... half of the battle is knowing where to find the answer...