CodeCademy Project
Full-Stack Engineer Path > Front-End Development > JavaScript Syntax, Part III
Project (3-15) Rooster Regulation The goal of this short project is TDD of JavaScript code using Mocha. In order to test the index.js file, we need to use Node.JS and install Mocha:
npm init
npm install mocha -D
An experimental rooster object has been developed without any tests! It’s up to you to write them.
By the end of this project you will have a fast, complete, reliable, isolated, maintainable, and expressive test suite: it will provide confidence that the rooster is functioning correctly and it will act as a form of documentation for other developers.
You can find the rooster defined in index.js. You will write a test suite in index_test.js within the test directory using the Mocha test framework and assert methods from the Node.js standard library. If you’re unsure about any of the methods, you can use the documentation linked.