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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Dev D](https://secure.gravatar.com/avatar/6b1069ef0f01c4eb9ec93304c646db0e?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Dev D
Front End Web Development Techdegree Student 406 PointsMocha VS Chai?
What is the difference between Mocha and Chai? When to use which one?
3 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsChai 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](https://secure.gravatar.com/avatar/84893487a35389a45fcb062ae28979f3?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Andy Hu
7,473 PointsMocha 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](https://secure.gravatar.com/avatar/84893487a35389a45fcb062ae28979f3?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Andy Hu
7,473 PointsJust shut up, Steven Parker. We are trying to contribute here, stop qualifying yourself.
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsI 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](https://secure.gravatar.com/avatar/84893487a35389a45fcb062ae28979f3?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Andy Hu
7,473 PointsWell 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](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsPerfection 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!
![Andy Hu](https://secure.gravatar.com/avatar/84893487a35389a45fcb062ae28979f3?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Andy Hu
7,473 PointsI 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](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsOne 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](https://uploads.teamtreehouse.com/production/profile-photos/1153532/micro_image.jpg)
Chris Freeman
Treehouse Moderator 68,425 PointsAndy 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.
![Johnny Austen](https://uploads.teamtreehouse.com/production/profile-photos/11535570/micro_jman.jpg)
Johnny Austen
Front End Web Development Techdegree Graduate 35,494 PointsThe main thing I took from this thread is that Steven Parker is an absolute legend.
![Amy Tomey](https://secure.gravatar.com/avatar/1a609d30362adcb9f565bd7f2c4932a7?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Amy Tomey
12,847 PointsSteven 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...